Text Links Ads : Marketing Tips Store : Search Engine Optimization Strategies
WebPosition Gold Pro : Domain Registration Bank : Optilink Software : GoDefy
Mike's Marketing Tools : Mike's Ecommerce Software : Text Links Guide
 
Web HTML-HTML.com
You are here: HTML Codes > Forms > <INPUT ...> > TYPE

TYPE = RESET

RESET resets the form so that it is the way it was before anything was typed in:

<FORM ACTION="../cgi-bin/html/mycgi.pl">
<INPUT TYPE=TEXT>
<INPUT TYPE=SUBMIT> 
<INPUT TYPE=RESET>
</FORM>

which gives us:

For a while it was the perception that all forms "had" to have a reset button, but designers have found that resets are more likely to detract from the form than add to it. Users don't usually need to reset their forms, and they are more likely to accidentally hit the reset button than they are to actually want to wipe out their work. Unless you have a specific reason to expect that users will need a reset button it's probably best to leave it out.

If you do choose to use have a reset button in your form, consider adding a check if the user actually wants to reset. You can do this by adding an onReset event handler to the <FORM ...> tag:

<FORM 
 ACTION="../cgi-bin/html/mycgi.pl" 
onReset="return confirm('Do you really want to reset the form?')"
 >
<INPUT TYPE=TEXT NAME="query">
<INPUT TYPE=SUBMIT> 
<INPUT TYPE=RESET>
</FORM>

which creates this form:

If you add the VALUE attribute to the tag then that value is used as the text for the button.

<FORM 
 ACTION="../cgi-bin/html/mycgi.pl" 
 onReset="return confirm('Do you really want to reset the form?')"
 >
<INPUT TYPE=TEXT NAME="query">
<INPUT TYPE=SUBMIT> 
<INPUT TYPE=REset VALUE="Start All Over">
</FORM>

which gives us:

TYPE=BUTTON >>>

Copyright © 2002-8 Art Dacor USA LLC. All Rights Reserved.
3727 West Magnolia Blvd #489, Burbank, CA, 91505, USA.
www.HTML-HTML.com