Form Scripts - Page 6 | JavaScriptSource

Form Scripts - Page 6

These scripts (and a few tutorials) all deal with Javascript forms. We'll show you some really neat forms that keep you from receiving bogus information as well as others that are just fun to play with (test personal info).

In addition, be sure to check our snippets section for additional form-related scripts.

As always, we're here if you have any questions or comments. General questions about form scripts here should be posted to The JavaScript Forum.

  • Update Order Form w/o Page Refresh
    Kevin Hartig Dec 21, 2005

    In this order form, the cost for each item is totaled as the items are selected and deselected. This is done without refreshing the entire page in order to save other form information. Heavily commented.

  • Country State Drop Down
    Dec 9, 2005

    A simple international country and state drop down list that automatically repopulates the state section based on the country selected without page refreshes.

  • Check All Toggle Switch
    Hillel Aftel Nov 30, 2005

    This script adds the "check all" function to a form. Short and easy to use.

  • Weight Converter
    Steve S Nov 23, 2005

    This script creates a weight converter that can convert five different units at one time.

  • Undo-Redo
    Turnea Iulian Nov 18, 2005

    Give your users the option of changing their entries in your textareas. Add this script to your forms or use it in a WYSIWYG editor.

  • ABA Routing Number Checksum
    David Leppek Nov 14, 2005

    This script will validate an ABA routing number according to a given algorithm. (Although the number may be valid, it may not be actually assigned to a financial institution.)

  • Dropdown Box Population (Revised)
    DeWayne Whitaker Nov 9, 2005

    Multiple series of dropdown boxes (up to 3) are automatically populated based on previous selection. Revised to work with IE, Netscape, Firefox, and Opera.

  • Credit Card Number Validation 2
    David Leppek Nov 7, 2005

    Determine if a credit card number could be valid before submitting it for real-time online authentication. Based on ANSI X4.13, the LUHN formula, aka the Mod 10 algorithm is used to validate accurate credit card numbers. Heavily commented.

  • JS Invoice with Math
    Terry Lyman Nov 4, 2005

    JS Invoice with Math

  • Input Box Comments
    Lee Underwood Nov 2, 2005

    Display a few words in a form field and when focus is given to the field, the words will disappear. Great for providing instructions in a small space.

  • Toggle Tab Menus
    DevZone Baldean.com Oct 2, 2005

    The menus can be toggled on and off, instantly creating a simple tabs interface. The content is displayed accordingly to the selected tab.

  • User Details
    Steve S Sep 22, 2005

    "This is an advanced script which, in addition to ""standard"" information like a user's browser, defines a used API too. In Netscape it works incorrectly."

  • Forms Validation
    Steve S Aug 30, 2005

    This script can be used to check form input, not only for all required fields being completed, but can also make certain that fields requiring number (integer) or date input have been filled in correctly.

  • E-mail Address Validation2
    Anita Sudhakar Aug 19, 2005

    This script verifies the given value as a possible valid e-mail address.

  • Colorful onMouseOver Objects
    Th( Cao Phong Aug 9, 2005

    This script can make objects become more lovely and colorful. In the example, you move your mouse over the objects below to see the effect.

  • Adding Options
    Rick Johnson Aug 3, 2005

    Add or change options on a form select menu. Simple script, includes comments.

  • Extensive Menu
    Steve S Jul 25, 2005

    "The most usefull this menu seems to be for projects with a large amount of all kind of information to represent, e.g newspapers. Enjoy! "

  • Random Text Rotator
    Steve S Jul 25, 2005

    "You can add an unlimited number of quotations and script will view them in random order "

  • Dynamic Form Fields
    Peter Pugh-Jones Jul 22, 2005

    Create a form that dynamically changes the number of fields available based on a select list value.

  • Converting a String to Title/Sentence Case
    Sathish Vaidyanathan Jul 21, 2005

    Ugly but quick JavaScript to convert a given sentence to title case.

  • Priority Juggler
    Clarke Isackson Jul 19, 2005

    Rearrange the priority of an item that is in a list of items.

  • Adding HTML Controls
    Jul 13, 2005

    Use this script to add HTML controls to your forms. This example uses the <input> tag.

  • DataBaseSel
    Ira Sterbakov Jul 1, 2005

    A method to load multiple drop-down menus the from previous selections of other drop-down menus.

  • Simple Color Runner
    Richard Hucko Jul 1, 2005

    Displays Letters of a phrase one by one while coloring each letter. The colors run accross the text as many times as you like.

  • Image Upload Preview 2
    Abraham Joffe Jun 29, 2005

    This script is intended for forms where the user needs to upload an image to a Web site. The image is displayed on the page for previewing before uploading. The display will be resized if needed so as not to break the page layout. Valid file types are set in the script; others will be disallowed. Works only in Internet Explorer but degrades gracefully.