JavaScript Forum JS Made Easy: Free JavaScripts Tutorials Example Code
About This Product
FontsMadeEasy.com
 
The Business Internet
Find it on This page:
 
| Over 5000 Free Fonts | Tutorials | Javascript Forum | Other Javascript Resources | Cheat Sheet

     
Jsmadeeasy Forums Home   Search   Login   Register   Member List  
JS Made Easy  > JavaScript programming  > Re:  
 
Display using:  
Previous Thread :: Next Thread 
 Author Thread: Automatic form clearing
gonsa is not online. Last active: 7/28/2004 3:52:08 PM gonsa
www.spinbit.com
Top 25 Poster
Joined: 28 Jul 2004
Total Posts: 5
 
Automatic form clearing
Posted: 25 Feb 2002 10:29 AM
Hi.
I want to clear all the fields of a form (if it's submitted) when the back button is pressed.

Thanks in advance - gonzalo

gonSaVP

gonSaVP
MostCS is not online. Last active: 7/28/2004 3:52:08 PM MostCS
www.digitalboxexpress.com
Top 25 Poster
Joined: 28 Jul 2004
Total Posts: 5
 
Re:
Posted: 25 Feb 2002 12:14 PM
I'm not sure if this would work but you can set the TTL on the page so it needs to be reset every time it is opened and then set the values of each input to "".

If you are trying to make sure that people do not submit the same info over and over again you can try another method that I use. I open another smaller window with the form it. I use the focus method to make it come up on top and then have the user input their info there. When they submit it goes to another window to process the info and then it will close itself. This makes the back key useless since the window they entered their info in is gone.

In my situation I show the users their info and have a key labeled "update my info". When selected in opens the other window which allows them to see their current info and update it. When it closes I have it refresh the main window so they see all of the updated info live.

Hope this helps,

Chris

Admin is not online. Last active: 12/1/2005 12:27:12 PM Admin
Top 25 Poster
Forum Moderator
Joined: 28 Jul 2004
Total Posts: 15
 
Re:
Posted: 26 Feb 2002 01:01 AM
I like the suggestion MostCS gave. I might change some of my form submitions.

here is how I do it now in my ASP files.

<%Response.Expires = 0%>

this will not allow the page be cached.


gonsa is not online. Last active: 7/28/2004 3:52:08 PM gonsa
www.spinbit.com
Top 25 Poster
Joined: 28 Jul 2004
Total Posts: 5
 
Re:
Posted: 27 Feb 2002 05:46 AM
Thanks everybody!

gonSaVP

gonSaVP
Previous Thread :: Next Thread 
Goto to page:  Prev Next
 
Jsmadeeasy.com  > JS Made Easy  > JavaScript programming  > Re: