CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Other Programming Languages: Javascript:
Back button in browsers

 



varo
stranger

Jul 18, 2001, 6:49 PM

Post #1 of 2 (12571 views)
Back button in browsers Can't Post

How do I disable the back button from a browser.
in order to prevent users from returning to the previous page with the back button.

I have information in the previous page that was submitted by forms. I don't want the users to submit the information again.



BrightNail
Novice

Jul 28, 2001, 3:57 PM

Post #2 of 2 (12559 views)
Re: Back button in browsers [In reply to] Can't Post

hey,
are you in frames...?
If your in frames,, when a user Hits submit, he/she then sets a variable in another frame. Since the frame is always there, the set variable will still be there even if someone goes back to the page. SOOO, when someone submits, the variable in another frame is checked...its false (that is the default setting), so it submits...document.submit()...then have the javascript set the variable in the other frame to "true"....if the variable was true, then the form wouldn't submit, or it can launch an alert....

If you don't have frames, you can use a cookie, or check the history of the URL, if your coming from a certain url, then on your form page, it redirects....


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives