473,761 Members | 5,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Executing server event and Javascript event

Hi,

How can I acomplish following:
I want to create a file on server using onClick server event, and then I
want to open that file in new window using Javascript window.open(). How can
I do it ?

Thanx, Neven
Nov 19 '05 #1
3 1540
Create a file in the OnClick event handler, and then use
Page.RegisterSt artupScript() to add a JavaScript to the page that opens a
new window (using JavaScript window.open()) with the URL of the image you
just created.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Neven Klofutar" <neven.klofutar *r.e..mo*****@v ip.hr> wrote in message
news:#L******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

How can I acomplish following:
I want to create a file on server using onClick server event, and then I
want to open that file in new window using Javascript window.open(). How can I do it ?

Thanx, Neven

Nov 19 '05 #2
popup blocks will prevent this code fropm working. instead, have a stand
html button or anchor open the popup. create the file as the first step of
rendering the pop aspx page (instead of posting back the page to create the
file). if you need to postdata back before creating the file, then have a
save button. after the save render the open button.

-- bruce (sqlwork.com)


"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:O3******** *****@TK2MSFTNG P09.phx.gbl...
| Create a file in the OnClick event handler, and then use
| Page.RegisterSt artupScript() to add a JavaScript to the page that opens a
| new window (using JavaScript window.open()) with the URL of the image you
| just created.
|
| --
| HTH,
| Kevin Spencer
| .Net Developer
| Microsoft MVP
| Neither a follower
| nor a lender be.
|
| "Neven Klofutar" <neven.klofutar *r.e..mo*****@v ip.hr> wrote in message
| news:#L******** ******@TK2MSFTN GP09.phx.gbl...
| > Hi,
| >
| > How can I acomplish following:
| > I want to create a file on server using onClick server event, and then I
| > want to open that file in new window using Javascript window.open(). How
| can
| > I do it ?
| >
| > Thanx, Neven
| >
| >
|
|
Nov 19 '05 #3
I get it, ok, thanx !

Neven
"bruce barker" <no***********@ safeco.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
popup blocks will prevent this code fropm working. instead, have a stand
html button or anchor open the popup. create the file as the first step of
rendering the pop aspx page (instead of posting back the page to create the file). if you need to postdata back before creating the file, then have a
save button. after the save render the open button.

-- bruce (sqlwork.com)


"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:O3******** *****@TK2MSFTNG P09.phx.gbl...
| Create a file in the OnClick event handler, and then use
| Page.RegisterSt artupScript() to add a JavaScript to the page that opens a | new window (using JavaScript window.open()) with the URL of the image you | just created.
|
| --
| HTH,
| Kevin Spencer
| .Net Developer
| Microsoft MVP
| Neither a follower
| nor a lender be.
|
| "Neven Klofutar" <neven.klofutar *r.e..mo*****@v ip.hr> wrote in message
| news:#L******** ******@TK2MSFTN GP09.phx.gbl...
| > Hi,
| >
| > How can I acomplish following:
| > I want to create a file on server using onClick server event, and then I | > want to open that file in new window using Javascript window.open(). How | can
| > I do it ?
| >
| > Thanx, Neven
| >
| >
|
|

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2456
by: Mike | last post by:
Hi, I am trying to resize a HTML table through Javascript. When the user control loads the first time, the table is resized, but then it doesn't anymore. I am using the following code in the Load event of the web user control: if ( ) this.Page.RegisterStartupScript("CallBothGrids", "<script language=javascript> { showBothGrids(); }</script>"); else
1
1487
by: bennett | last post by:
At http://www.brainjammer.com/testing/validator_test.aspx I have a text field where you can enter text, and a button where if you click the button, it sets the value of a label below it, to display the text you entered in a text field. There is also a RequiredFieldValidator for the text field so that you get an error if you leave it blank. As long as I have EnableClientScript set to true for the RequiredFieldValidator, if I leave the...
1
6956
by: puja | last post by:
hi all, I have this .aspx page for which the Page_load event occurs twice. I found out while debugging. After searching google, I tried checking with Page.Ispostback method and also had "AutoEventWireUp" = false and also run after removing this tag from page directive but still my page_load event gets called twice. I have 3 pages called Search.asp, Processing.aspx and ConfirmSearch.aspx.
1
18853
by: den2005 | last post by:
Hi everybody, I am confused and still looking why this codes is not working. Can anyone notice or know why this code is not working? Thanks in advance. Code working: <form id="form1" runat="server"> <div> &nbsp;</div> <div>
14
23169
by: lmttag | last post by:
Hello. We're developing an ASP.NET 2.0 (C#) application and we're trying to AJAX-enable it. We're having problem with a page not showing the page while a long-running process is executing. So, we're looking for a way to display the page with a "please wait..." message while the process is running, and then, when the process is done, update the page with the actual results/page content. We have a page that opens another browser/page...
8
2368
by: Grorange | last post by:
Writing ASP.NET pages, I have a need for client-side functions to prevent going to the server for every small change. I have a list of server side created checkboxes filled with a lot of information being presented in a form on my site. In a JavaScript setup function, I attach the following event handler (I know syntax is wrong, I just simplified it for purposes within this post): <for every checkbox>onchange = function() { ...
7
6029
by: jphaycock | last post by:
Hi all I am calling a method in a Page_Load event that makes use of a value from a text box. Unfortunately the textbox value is only set after a javascript runs and the page is rendered. Therefore the textbox is actually empty when the Page_Load event fires. Is there a way to execute the method after the javascript has run and
0
1564
Frinavale
by: Frinavale | last post by:
I have a peculiar problem... Background: I have a function that I don't want the user to execute more than once while they are waiting for it to process; therefore, I disable all of the controls on the page via some JavaScript before the request is sent. This function takes some time to execute because it has to communicate with hardware that is rather slow. This slowness combined with a little bit of lag sometimes results in a ...
0
9554
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9989
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9811
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7358
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5266
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.