Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
139
rated 0 times [  141] [ 2]  / answers: 1 / hits: 46888  / 15 Years ago, mon, june 15, 2009, 12:00:00

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.


More From » html

 Answers
14
function submit_form() {
document.formu1.submit();
document.formu1.reset();
}


<form name=formu1 action=action-page method=POST target=_blank />
Name: <input type=text name=name /><br /><br />
Pass: <input type=password name=pass /><br /><br />
<input type=button value=Send onclick=submit_form(); />
</form>

[#99311] Thursday, June 11, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dezmondhumbertob

Total Points: 79
Total Questions: 112
Total Answers: 107

Location: Morocco
Member since Fri, May 22, 2020
4 Years ago
dezmondhumbertob questions
;