Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

londonweb

macrumors 6502
Original poster
Sep 14, 2005
260
0
london
I think this is a javascript question; does anyone have a script to disable the forward and back buttons in the browser?

I normally avoid building flash pages that are all contained within one html page, because it drives people nuts when they click 'back' and end up accidentally exiting the page and having to reload the movie again. But this time it's unavoidable.
 
londonweb said:
I think this is a javascript question; does anyone have a script to disable the forward and back buttons in the browser?

You can't really 'disable' them, but you can use workarounds to achieve something similar.

I don't remember what the function was, but you can redirect the browser to another page - like, after clicking on a link - via JS without the new page being added to the browser's history. Of course, the user can still go "back" to where he was before he entered your website.

Alternatively, you might want to look into AJAX and update the page dynamically.
 
I don't think any browser other than IE will let you disable them. Wouldn't you get really annoyed if you wanted to press the back button to go back to a search engine or previous site but had to close your browser to do so?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.