[thelist] Empty Form Responses --> Re: How do I clear form input fields onSubmit (or somehow)?

Simon sentient at mm0.net
Thu Aug 3 12:45:56 CDT 2000


Hello all (again),

In an email yesterday I asked:

>   > So what I'd like to know is whether it's possible to clear the
>>  contents of those three fields at the time the form contents are sent
>>  without having to reload the parent page in the background. Ideally
>>  I'd like to just clear the contents, leaving the rest of the page
>   > alone.

The suggestion posted here was to do this:

>  Actually it is quite easy to reset your form, just put the following code in
>  your onsubmit handler:
>
>   document.yourFormName.reset();
>
>  And voila! Its all cleared.

Now, while the form fields are clearing perfectly when the person 
clicks the "send" button there is one new problem. All the comment 
card forms are now generating nothing but blank emails to us. Seems 
like the "reset" is happening *first* and then the form is sending us 
the contents of the now empty fields.

So my new question is how do I stop this from happening? Is there 
some way to only clear those fields after the information has been 
sent?

Simon
-- 

...........................
"Where are we going and why
  am I in this handbasket?"
-- Dante Alighieri, c. 1321
...........................





More information about the thelist mailing list