Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

browser reload problem

Status
Not open for further replies.

dorothyw

Programmer
Jul 11, 2001
6
HK
i'd like to know if there's any script to 'prevent' the user in clicking the reload icon on the browser window?.. which i mean is that the page will not be reloaded even the user click the reload icon.. or is there any way to solve the problem?
 
hmm.. moreover, can i show any alert msg if the user want to close the browser?
Thx in advance.
 
Hi,

This is just an idea, but I think that you generally can't prevent that. The user can always click refresh or use Ctrl-R (or something like that).

A solution might be opening the page, on which you want to disable reload, in a popup without menubars.
Then you capture all key events to prevent the user from using shortcuts.

But, I don't see why you should want to prevent such a thing? Can you tell me more on this?

Think your question about the alert is a bit the same. This is a system operation which can always be executed.
This is just an idea, but maybe you could use onblur? But after that the page will still be closed. :p

Gtz,

Kristof -------------------
Check out my new site:

Any suggestions are more than welcome.
There's a LOT of work to do, so judge fairly. :)
 
try calling on onload function in the body

<BODY onload = &quot;function()&quot;>

which sets window.menubar = no

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top