jQuery in Action, 2nd edition*
The moose likes HTML, CSS and JavaScript and the fly likes Replace page after posting a form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Replace page after posting a form" Watch "Replace page after posting a form" New topic
Author

Replace page after posting a form

aishwarya bhave
Greenhorn

Joined: Nov 23, 2003
Posts: 1
Hi,
This is a probably a beginner question. I have a form in a.jsp to be posted to b.jsp.Once the form is submitted, I do not want the user to be able to go back to the a.jsp using the browser back button. I've tried using window.location.replace, in <form action = "window.location.replace(URL) method =" post"> and in the onClick of the 'Submit' button, but it seems as though I can only do one thing at a time,post the data(form fields and hidden fields) or disable the 'back' functionality.
Please help!
Regards.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Best method is to have a cookie that remembers if the form has been submitted and it does not allow another submission.

There are other techniques that have been talked about on this forum.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Replace page after posting a form
 
Similar Threads
Clear/Reset - READONLY fields....
Page attribute in validator
The browser's refresh button cause trouble
send value using response.sendRedirect()
Problem caused by pressing the 'BACK' button on the broswer