Click to See Complete Forum and Search --> : closing IE window
shachar
Jun 5th, 2001, 02:14 AM
i m trying to find out when the user is closing an IE window and give him a message box telling him to close from another place and cancel his request to close the window.
any help would be appreciated .
10x
Sundance Kid
Jun 5th, 2001, 05:26 AM
I have the same question. I got it to work with vbscript (and javascript)
Sub window_onclose()
Msgbox "Closing"
End Sub
It worked great... but the problem was if the user refresh the screen, he gets the msgbox also.
But I never look further into it. If you get it.. please post it.
Thanks
shachar
Jun 5th, 2001, 05:28 AM
ok but when do you call this procedure
Sadovod
Jun 5th, 2001, 07:05 PM
I would use <body ="onunload=callYourOwnJScriptFunction()">
where you can re-open the same window and give the user any instructions.
shachar
Jun 6th, 2001, 01:22 AM
yes i know that but i dont want him to close the window because this window is a part of an ASP project with VB ocx that i have to set to nothing when i get out thats the reason i want to know how to cancel the closing of the window like in VB when you write cancel=true.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.