The Wayback Machine - https://web.archive.org/web/20090129121554/http://www.webreference.com:80/html/tutorial13/11.html


spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / html / tutorials / 13 / 11

index123456789101112131415161718192021exercises1

Tutorial 13: Giving Form to Forms

Developer News
Open Source ECM Growing Up
Android's Second Act, G2 Rumors Heat Up
Eclipse Rolls Out PHP Development Tools 2.0

Submit buttons

A submit button is a button which, when clicked (or otherwise activated), will submit the form with its current values. Submit buttons may have names and values, or they may not. If they don't then the button simply says "Submit Query" or something similar. Otherwise, it displays the contents of the VALUE attribute. You can also have multiple submit buttons with different names and/or values, so clicking on a different button will produce a different result. So, our subscription form can be completed like this: (Note: actually submitting the following forms will just load the current page again).

<FORM ACTION="/cgi-bin/html/formdump.cgi" 
      METHOD="GET" ENCTYPE="application/x-www-form-urlencoded">
<P>Enter your e-mail address:
<INPUT TYPE="text" NAME="email" SIZE="30">
<P>Subscribe
<INPUT TYPE="radio" NAME="action" VALUE="subscribe">
Unsubscribe
<INPUT TYPE="radio" NAME="action" VALUE="unsubscribe" CHECKED>
<INPUT TYPE="submit" VALUE="Submit">
</FORM>

Enter your e-mail address:

Subscribe Unsubscribe

Or, it can be rewritten like this:

<FORM ACTION="/cgi-bin/html/formdump.cgi" 
      METHOD="GET" ENCTYPE="application/x-www-form-urlencoded">
<P>Enter your e-mail address:
<INPUT TYPE="text" NAME="email" SIZE="30">
<P>
<INPUT TYPE="submit" NAME="action" VALUE="Subscribe">
<INPUT TYPE="submit" NAME="action" VALUE="Unsubscribe">
</FORM>

Enter your e-mail address:

index123456789101112131415161718192021exercises1

Produced by Stephanos Piperoglou

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Copyright 2008 Jupitermedia Corporation All Rights Reserved.

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Apache Basics, Visited · Introduction to AJAX Technologies · Functional JavaScript
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Seiko Downsizes Their Latest Mobile Thermal Printers · 2009 Awards: Readers Pick the Best Small Business Tech Tools · E-Commerce News: SEO, Social Commerce Apps Debut

URL: http://www.webreference.com/html/tutorial13/11.html

Created: May 28, 1998
Revised: February 25, 1999

Morty Proxy This is a proxified and sanitized view of the page, visit original site.