views:

936

answers:

2

After the onsubmit event has fired and the form has been submitted (via an action="mailto:[email protected]") , is there a way to then clear the form, close the window or what? Is there a post submit that I can hook into via JavaScript. This must be a client side only solution.

+1  A: 
David Dorward
I'm sorry but I don't see how that works. Once the form has been submited. Nothing happens. I'm dropping the reference to the form along the way somewhere.
Mike T
+5  A: 

A quick and easy solution:

<form action="mailto:[email protected]"
    onsubmit="this.submit(); this.reset(); return false;">
jimyi
My code looks like this:<form action="mailto:[email protected]" method="post" name="volunteer" id="volunteer" onsubmit="this.submit();this.reset();return false;" enctype="text/plain">This gives me a JavaScript error saying that the object dosen't support this property or method. I'm looking for another smoking gun to cause thi issue. When the extra onsubmit code is removed, everything is ok. So I'm a little stumped.
Mike T
I'm not getting an error. Can you post an example page?
Sidnicious
I will in a few, dragged off to another prokject but will come back to edit the question a bit
Mike T