Tring to use an image as a RESET button

liunx

Guest
I'm attempting to use an image as a reset button on a form. No matter what I do, it won't reset the form, insead it submits whatever data is there? Below is the code i'm attempting to use, any help would be appreciatied. <br />
<br />
<br />
<br />
<input type="image" name="reset" id="reset" src=http://www.htmlforums.com/archive/index.php/"images/reset.gif"><br />
<br />
the code is inside a table and inside the form tag....<br />
<br />
thanks<br />
adam<!--content-->There is no such thing as an image reset button, only an image submit button. It can be accomplished using JAVA script however. Look through the client side forum and you can find the thread, if not I'll try and find it for you.<br />
<br />
Regards,<br />
Kevin<!--content-->Kevin,<br />
Thank you for your reply. That is pretty much what I figured. I am unable to find the javascript you mentioned however. I went through the client side forum as well as search multiple javascript web pages to find the script. If you could forward it along to me I would really appreciate it.<br />
<br />
Thank You,<br />
adam<!--content-->Hi Adam,<br />
<br />
Read all the posts in this thread and see if that helps:<br />
<br />
<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?threadid=3458">http://www.htmlforums.com/showthread.php?threadid=3458</a><!-- m --><br />
<br />
Kevin<!--content-->how about this:<br />
<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"#" onClick="document.formname.reset()"><img src="whatever.gif" border=0></a><!--content-->it is possible, but you have to go about it in a different way. i saw it like 2 years back on tripod.com<!--content-->Originally posted by Dr. Web <br />
how about this:<br />
<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"#" onClick="document.formname.reset()"><img src="whatever.gif" border=0></a> Sure, this would work, but a safer alternative, just in case Javascript is not supported, is:<br />
<br />
<noscript><br />
<p><input type="reset" value="Clear"></p><br />
</noscript><br />
<br />
<script type="text/javascript"><!--<br />
document.write('<p><a onclick="document.theform.reset();return false;"',<br />
'href=http://www.htmlforums.com/archive/index.php/"#"><img alt="Clear" src="clear.gif" border="0"><\/a><\/p>');<br />
//--></script><br />
<br />
Netscape 2 supports Javascript 1.0 and still renders all NOSCRIPT content, but having 2 RESET buttons are less fatal than having none at all.<!--content-->Netscape 2? Do we really have to take a version 2 browser into consideration? ;)<br />
<br />
Kevin<!--content-->ha! I hope not! Otherwise I have a lot more to worry about!!! :)<!--content-->
 
Back
Top