Welcome visitor
* Login
* Register
It is currently September 20th, 2019, 5:18 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  Reset a Form after Submit
PostPosted: October 9th, 2009, 2:56 pm 
User avatar

Posts: 61
After you submit a form if you click the back button you will be redirected to the form and it will still filled, is there a way to reset it after it has been submited? Thank you.


Top
 Profile  
 
  Re: Reset a Form after Submit
PostPosted: October 10th, 2009, 5:10 am 
User avatar

Posts: 112
if you submit a form there is nothing to reset, if you reset the form there's nothing to submit, but maybe this can help you
<body onload="document.form.reset();" onfocus="document.form.reset();">

firefox works fine with the onfocus option alone, and internet explorer with the onload event, so this line is cross-browser proof. yes it will reset the form when you switch windows, but i think you can fix it, this was just tha main idea.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron