JavaScript in ASP.NET
Hello all,
I am re-writing a page from ASP to ASP.NET. There is some javascript in the original page that uses the onBeforUnload event. I need this functionality also in my new page. In the orginal page I have this code in a javascript event:
window.opener.location = 'CancelCallFromCallBox.asp';
This page runs a SQL Update command. I also need my new page to do this. However when I include the same coded above in my .aspx page, it does not redirect to my the "cancel" page (which is also now in .NET). Does anyone know why or give me a better idea on how to handle the problem
Basically I want to run a SQL Update if the user cancels by pressing a button(code is easy in code behind), OR, and most importanly , if they click on the "x" to close the window.
Dose anyone have some good coding ideas? Any help would be appreciated!
Thanks in advance!!!
Jim Benson
|