View Full Version : Removing form content on submit
08-10-2006, 10:38 AM
I have a simple form (containing only a text field). When something is entered into it and submitted, clicking back on the browser displays the form contents again. Dis however doesnt happen to all my forms. Im thinking probably because this contains only one field.
any way to overcome this?
08-10-2006, 11:42 AM
Using the "back" button, the page containing the form is probably retrieved from the browser's cache; I don't think you can influence this behaviour, other then changing the browser settings. Also, this behaviour is not reliable enough to expect it to do one thing or another consistently: if the browser decides it's unable to reliably load the page back, you could get an error message, or the original page is loaded again.
You can't, or shouldn't, try to prevent users from using the back button; what can be done is forwarding the user to a useful page after submitting the form. For example, after submitting this response this forum shows a page that confirms my reply has been processed and then forwards me to the discussion that I replied upon; there's no need for me to hit the back button.
08-10-2006, 09:06 PM
What browsers do when you press the back button to go back to a page with a form depends on which browser you are using. Some will repopulate all fields except passwords, some wont repopulate anything, and some will ask if you want to reload your prior content. The only way to change from one of these options to another is to change which browser you are using.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.