...

View Full Version : Reset form through Javascript



uleddie
02-20-2003, 06:11 PM
I am trying to add a custom reset button to my form. How do i reset the form through javascript.

TIA

Eddie

Philip M
02-20-2003, 06:20 PM
<input type="reset" value="Reset The Form" onClick="willReset=confirm('Are you sure you want to clear all your entries? ');return willReset;">

uleddie
02-20-2003, 06:31 PM
Thanks but that is not quite what i was looking for. I am trying to use a input type="image". I want that image to have an on click event that resets the form.

Philip M
02-20-2003, 06:45 PM
<a href="javascript:document.formname.reset()">
<img src="resettheform.jpg" Width="100" Height="20" Alt=""></a>

uleddie
02-20-2003, 06:48 PM
Thanks :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum