Disabling the back button, for whatever reason, is very very very very bad web design. The history feature most browsers carry is one of the strong points of the web (being able to go back to where you came from previously), and those that try to disable it for whatever reason and by whatever mean (opening a new window, or using JS), find themselves easily bitten by keyboard commands or other features.
That said, if you don't want a form to be reposted after a user leaves it, assign a unique session id that is generated when you first give the user the form and stored as a hidden field within it. When the form is submitted, toggle this sessionid as 'done', and if the form is resubmitted, you can easily check if that session id has already been procesed or not. (Similar to other ideas already posted).
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.