Web Hosting Directory | Web Hosting Resources | Webmaster Resources | Domain Tools | Search Engine Marketing | Forums
  Signup
Today: 1,255   Yesterday: 949   Max: 2,773   Total: 530,285   Current Users : 14 (Member 0) 
DOMAIN TOOLS

WEBMASTER TOOLS

RELATED ARTICLES

SUBMIT AN ARTICLE

Write for us and get publicity, link to your website, and best of all get paid. Please visit our writers page for details.


LINK TO US

Link to us and earn points for each visitor you bring to us. Please visit our link partner page for details.

 

TYPE = RESET

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

<FORM ACTION="../cgi-bin/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/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/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:



Copyright 1997-2002 Idocs, Inc. Written by Miko Sullivan.

 
 
 
What is your major source of website traffic?
 
 
 
 
 
 

ADVERTISEMENT

 
Cheap Web HostingBudget Web HostingEcommerce Web Hosting
Link to UsLink ExchangeAdvertisePrivacy PolicyTerms Of ServiceAbout UsContact UsSitemap
Copyright © 2006 - 2009 Broadband Media, Inc. All rights reserved.