adding extra code to the doPostBack function

G

Guest

Hello there,

I'm facing the following situation: I have an aspx web page which contains
several web controls (e.g button and drop down list). The drop down list in
particular has enabled the autopostback property so that I can do some
validations on the server.
This page has algo one html button which opens a new window by using a
javascript function to display some calculations. I have to close this new
window every time that a post back is made (e.g. the user selects a different
item on the drop down list) and even though I've written a JS code to close
the opened window, once the post back is made, the reference to the opened
window is lost and my js code doesn't work.
Is there any way to add this js code to close the window to the _doPostBack
function? so that every time that a post back ocurrs this new window can be
closed?

Thanks in advance.
César
 
C

Craig Deelsnyder

Cesar said:
Hello there,

I'm facing the following situation: I have an aspx web page which contains
several web controls (e.g button and drop down list). The drop down list in
particular has enabled the autopostback property so that I can do some
validations on the server.
This page has algo one html button which opens a new window by using a
javascript function to display some calculations. I have to close this new
window every time that a post back is made (e.g. the user selects a different
item on the drop down list) and even though I've written a JS code to close
the opened window, once the post back is made, the reference to the opened
window is lost and my js code doesn't work.
Is there any way to add this js code to close the window to the _doPostBack
function? so that every time that a post back ocurrs this new window can be
closed?

Thanks in advance.
César

Yes, you can 'do some work' before the __doPostBack. Check out the
comments on this old post, of how to 'add' your own function to the
postback processing:

http://groups-beta.google.com/group...read/thread/bb93fb4a3453e958/00ddf46325c7bc24
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top