Able to warn user if they accidently Close the browser

Jaise James

Reputable Poster
Hello,

Do you know if there is a way to warn an user if the end user closes the browser. Our users sometime close the browser without realizing it. Has any one come up with a solution, where when user hit the Close(X) button, it gives a warning message.
 
This is more of browser then E1. If you are using Firefox and have multiple tabs open it does give msg that you want to still close it.

May be you can dig more on this line.

Chan
 
There are numerous hacks you could use but I am assuming you want a less exciting approach...

User Configuration\Administrative Templates\Windows Components\Internet Explorer\Browser menus

This Prevents users from closing Internet Explorer and Windows Explorer. If you enable this policy, the Close command on the File menu will appear dimmed. If you disable this policy or do not configure it, users are not prevented from closing the browser or Windows Explorer.

Note: The X button in the top right corner of the program will not work; if users click the X button, they will be informed that the command is not available.

http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/gp/751.mspx?mfr=true
 
All,


Thanks for your replys and suggestions. I created a simple Java script to do this.

Its working fine
 
No.. its going to cost ot money... Just kidding...

Here it is

You need to place this code between the <script> </Script>

window.onbeforeunload = function() {
window.unloadTimer = setInterval(
"clearInterval(window.unloadTimer);",500);
window.onunload = function() {clearInterval(window.unloadTimer);}
return 'Are you sure you want to Exit out of Enterprise One?';
}

THis needs to be done in following file

httpmafletwrapperheader.jsp


Just remember, we are on E810, tools release 8.96.2.3.

I have nto tested it any where else.

Its working fine in IE, I have not tested on other browers
 
nick, I also starting looking at onbeforeunload but you beat me to the punch...

I have attached a sample to demo for others interested in seeing a sample...
 
jjanowski,


I was using something similar just like yours. However you will have the same problem. When you close the E1 window your event will be fired twice because of the Iframe E1 uses. Hence, I had to modify it a little bit to make it work correctly
 
Hi guys,

Tested the javascript of nick in the httpmafletwrapperheader.jsp, however its not working as desired on our end (8.12/8.96.1.5 using OAS). Whenever your clicking on the menu item, it always pops up the inserted script asking if you want to press "OK" for continue or cancel.

Now my problem is when i removed the script on the httpmafletwrapperheader.jsp file and restarted the server (even restarted the OC4J component), the damn thing still persist. Is it cached somewhere out there? How can i flush out the changes?

thanks as usual.
 
Back
Top