-
Handling the Back Button
I know this is a controversial topic, but I have a very good reason to control the back button. I'm building a quiz application and the user should NOT be allowed to go back and overwrite their answer. It's part of the application requirements.
The setup is a frameset that holds all the persistent data (including connection to the SCORM API), a top frame that has the application title, etc., and a main frame that holds the questions. Each question type (multiple choice, etc.) has it's own page, that relies on the persistent data in the parent frameset to run.
Basically, I need to either disable the back button (next to impossible), or detect that they've navigated to the page via the back button (tricky, because the same page can be loaded multiple times in a row), and display the question locked down.
Any thoughts?
-
After the form on a page is submitted, set a cookie for it or a session variable. Then if that page is returned to, kick them to the page they should be on.
-
Simpler solution: using location.replace()
Thanks though. ;)
-
Wow, that's awfully convenient. :)