When a user closes a window, or even the browser, I want to log him off. All I can find as hints say to pop a new window using the "onUnload" event, then fire the call to cgi, and close the "popped" window. I can make most, but not all, of that work.
In the popped window, I define a form that has all hidden fields which will submit the closure and logoff info to the cgi program. Then in the <body>, I do onload="window.document.forms['form'].submit();" which fires the cgi if that's all I do. But if I do onload="window.document.forms['form'].submit(); window.close();", then the window closes and the cgi never fires. Adding a delay between the two statements doesn't help.
How can I fire the cgi and then close the window?
Or should I be doing the auto-logoff a different way entirely?
Thanks, Paul
In the popped window, I define a form that has all hidden fields which will submit the closure and logoff info to the cgi program. Then in the <body>, I do onload="window.document.forms['form'].submit();" which fires the cgi if that's all I do. But if I do onload="window.document.forms['form'].submit(); window.close();", then the window closes and the cgi never fires. Adding a delay between the two statements doesn't help.
How can I fire the cgi and then close the window?
Or should I be doing the auto-logoff a different way entirely?
Thanks, Paul