Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fire event after form reset

Status
Not open for further replies.

Jonmanley

Technical User
May 20, 2003
2
US
I need to fire a client side event after the form has been reset how is this down. tried onrest=myfunc() but it fires before the reset occurs.
Thanks
Jon
 
<head>
<title>Untitled Document</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<script language=&quot;Javascript&quot;>
function onReset()
{
alert(&quot;Please enter your first name&quot;)

}

</script>
</head>

<body>
<form action=&quot;email.php&quot; method=&quot;post&quot; name=&quot;FormName&quot; onReset=&quot;return onReset()&quot; onSubmit=&quot;return checksubmit()&quot;>
<textarea name=&quot;textarea&quot;></textarea>
<textarea name=&quot;textarea2&quot;></textarea>
<input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Submit&quot;>
<input type=&quot;reset&quot; name=&quot;Reset&quot; value=&quot;Reset&quot;>
</form>
</body>
</html>


Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top