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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

disable browser's back button 1

Status
Not open for further replies.

muralinaidu

Programmer
Jan 2, 2001
27
DE
hi,
i want to disable browser's back button for some reasons in the project with which i am working with. is it possible? at the same time if the user right clicks on the web page it shouldn't show back and forward options in the menu it displays or if not it shouldn't display any thing if it's right clicked. any idea.
thanking u
kris
 
You can't disable the BACK button, but you can disable right-click using Javascript. A question often asked on these forums! Personally, I find a page with right-click disables *very* irritating.

Greg.
 
if you want to stop the user from using the back button, just tell javascript to not use the toolbar, or whatever it is, cant remember right now.... and then just disable right clicking. :)
hope this helps!

- Rusty
 
This won't prevent the back button from being pressed, but it will effectively keep them on the most recent page, thus making the back button useless.

<body onLoad=&quot;location=history.forward()&quot;>

This will only work on your site, of course. If they back up to a page off of your site which does not have this code, then they will stay there.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
hi sir's
thanks for ur's kind reply and suggestions. i'll try this.

Sincerely,
muralinaidu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top