after form submit and use back button..form have values...need to remove |
[eluser]dine[/eluser]
Hi I need very urgent help from ur side When i do search with some data. it redirect me to result-data page. but when I use browser back button on result page.... I get search form with same values prefilled i am sorry for my english. but only what all i want to remove those fields values when I back to that page thanks a lot
[eluser]Dam1an[/eluser]
This is expected behavious, why do you NEED to clear the values when you go back? If you reloa that page (force refresh) it clears the values just like it should
[eluser]TheFuzzy0ne[/eluser]
If you want the results to be cleared, just redirect back to that page again once the form has been submitted successfully. Using the back button will pull up the cached results, which you have little/no control over.
[eluser]Dam1an[/eluser]
Actually, you could send a no cache header... someone had a similar problem a few days back and that solved it
[eluser]Vi.[/eluser]
As I remember, I used like this solution. Add this code to submit button's action. Data will be post before all input reset. Code: onsubmit="document.form_name.reset();"
[eluser]dine[/eluser]
[quote author="inSerenity" date="1243096766"]As I remember, I used like this solution. Add this code to submit button's action. Data will be post before all input reset. Code: onsubmit="document.form_name.reset();" Don't know why but it's not working. I means I lost all data
[eluser]Dam1an[/eluser]
Would reseting the form on submit not clear all the data before its sent in the POST array?
[eluser]dine[/eluser]
[quote author="Dam1an" date="1243102223"]Would reseting the form on submit not clear all the data before its sent in the POST array?[/quote] Thanks for reply What all I am doing and getting is : If I set this "Onsubmit" event on submit button... it remains data in cache..I means data display in form when use back button If I set this event on form it reset the values but there is also on values in POST.. I know it is Obvious and I am doing wrong
[eluser]Vi.[/eluser]
Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" Here is my code. I tried this code and It is working only with IE. Modern browsers use cache for fast Go back. You can check this page to no-cache header. This is easy way to do. |
Welcome Guest, Not a member yet? Register Sign In |