How do I disable the browser's "Back" button

A

Alex567

Can I disable the browser's "Back" button using a script? I have a form that
validates data and if unacceptable send users to a "Sorry" page. I don't want
them to be able to just click "back" and submit again.
 
M

MD Websunlimited

Hi Alex,

AFAIK, there is no way to accomplish short of writing a program and installing it the browser.
 
S

SBFan2000

not that I know of and even if there were what would keep them from just
reloading the page and submitting again?
 
M

MaryHartman

Can I disable the browser's "Back" button using a script? I have a form that
validates data and if unacceptable send users to a "Sorry" page. I don't want
them to be able to just click "back" and submit again.

This is not fool-proof, but what I do is open the page in a new
window. The new Window has no history and therefore the back button
for that page is non-functional.
 
M

Murray

Some browsers may not allow you to do that, though (like Moz/Firefox), if
the user has configured it that way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top