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

Forms and Scripts

Until scripting for web pages came along, CGIs were the only way to process form data. Now that Javascript is available on most web browsers, scripting provides a whole new avenue of neat ways to use forms. Unlike with CGI, forms that use scripts process the information immediately and can return the results right to the current web page. Script-based forms can also react to events other than just the user pressing a "Submit" button.

An example of a script-only form is small form which sets the color of the current web page:

this code produces this
<FORM>
<SELECT 
 onChange="document.bgColor=this.options[this.selectedIndex].value"
 >
<OPTION VALUE="white">White
<OPTION VALUE="coral">Coral
<OPTION VALUE="yellow">Yellow
<OPTION VALUE="burlywood">Burlywood
</SELECT>
</FORM>

A more extensive example is this form which calculates the properties of various geometric figures:

Circumference and Radius of a Circle
picture of a circle
radius: circumference:
area:
Surface Area and Volume of a Cone
picture of a cone
radius:
height:
surface area:
volume:
Surface Area and Volume of a Sphere
picture of a sphere
radius: surface area:
volume:

This form also demonstrates that even a relatively simple script-based form requires lengthy script coding. Take a look at the source code for this form.

Mailto Forms >>>

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