Click to See Complete Forum and Search --> : How to disable IE "Exit" Button ?


davestraps
06-02-2003, 10:19 AM
Does anyone know how to disable the "x" button of IE toolbar when loading ?
I would like to force users to leave our intranet application by clicking a customized HTML button, not the "exit" button.
Thanks in advance.

Jona
06-02-2003, 10:22 AM
No, it's not possible. But if there are no links on the page, you can set the browser to remain open even if the user tries to exit the page, and only work if they click the exit button.

Jona

requestcode
06-02-2003, 11:33 AM
IE does recognize the onunload event when closing the window using the "X" button. Something like this:
<script language="JavaScript">
window.onunload=dosome_function
</script>

Of course you will have to figure out a way to determine if the closed the window from one of your supplied buttons or the "X" button. I believe there is also a onbeforeunload, but I have not used it so I am not sure how that works. If you do use the above code make sure it is in lower case and do not include the parens like you would normally do for a function call.

scriptkid
06-02-2003, 12:35 PM
You could open a chromless window ( i believe they are called ). One of those windows that have no title bars, border, menubar....anything at all except the webpage itself.