>>>I am attempting to delete records in the unload event of a window. The deletion works but when the pages finishes I get a GPF.
>>>
>>>Here's the vbScript
>>>
>>>
>>>Sub Window_OnUnLoad()
>>> Window.Navigate "../Catalog/DeleteRecord.Asp"
>>>End Sub
>>>
>>>
>>>Dan
>>
>>Why not simply use a "response.redirect" in your statement? This would cause an error, from what I can tell, because when the window is being closed, it's sent elsewhere, similar to "Get out of the car and drive to the store".
>>
>>Hugo
>
>Ok. I've isolated the problem. I added a home button and after hittin this button the above works correctly. The problem is that I was exiting IE and then I was getting a GPF. How can I determine that an someone has exited IE and then not run the code.
>
>Dan
By using a response.redirect, you're avoiding that whole mess since it is run on the server, not in the client (browser). The problem before was that you were redirecting the browser windo to another page and asking the browser to go to yet another page. Another alternative is to put a command button on the page that does the desired effect, such as opening a new window with the new page in it, sort of like consoles on such wonderful sites as geocities (the windows that keep popping up all the time) or other site who open 17 windows after you leave that particular one.
As for determining if the browser is closed, I'm not sure how the script would go, or even if such a thing is possible.
Let me know if this isn't quite clear. I'm not sure it would be to me but I'm fighting to find a better wording :)
Hugo
"My get up and go must've got up and went"
-Steve Tyler, Aerosmith