If you are concerned that someone will resubmit a form or be out of sequence if they use the back button, you could reset the form elements upon loading the document. Or you can check if history.go(1) is equal to a known document. In which case you can put up an alert. But, kill the button? Nope.Vinny

Chill out...we're simply making it clear that there so far, between the people who have posted, there's no conceivable appropriate use for this. The fact that you seem so upset with this makes me question why you're even inquiring...

And of course, as Kevin said, there's only one way he knows of, and he's a major guru in this sort of area.

This may sound rude, but if I did know how to do this, I'd probably request more info before telling you how...this could be used in less-than-moral ways for adult sites and such...

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>About the only way you can do this is to open a new window using window.open() (specifying that the browser history should not be copied to the new window) and then close the existing one.<HR></BLOCKQUOTE>

If that solution isn't acceptable to you, you'll have to do without. For security reasons, JavaScript provides no way to do what you want. Sorry.

It can be done in 4+ browsers but it doesn't really disable the back button, just erases the data behind it to an extant.

replace Method The replace method replaces the current History entry with the specified URL. After calling the replace method, you cannot navigate back to the previous URL using the browser's Back button.

Syntax: location.replace(URL)

This will replace the history with the current link every time a link is clicked<BLOCKQUOTE><font size="1" face="Verdana, Arial">code:</font><HR><pre><SCRIPT>function getTag(el,str) { while ((el!=null) && (str.indexOf(el.tagName + ":")<0)) el = el.parentElement return el}

Before wasting your time, you should be aware that the above code only replaces the current document with the new document to be loaded by a link. It does not affect the rest of the browser history. There is no way to remove pages that were present in the browser history before the current page was loaded.

In effect, you can only use the above code to prevent people from reaching other pages on your site using the back button, and you cannot use this method to perform form submissions.