Form Scripts - Page 4 | JavaScriptSource

Form Scripts - Page 4

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.

  • Unobtrusive Dynamic Select Boxes
    Bobby Sluis May 23, 2007

    Use this script to produce select boxes that relate to one another. Choose an option in the first box and the script will change the available choices in the second box to match your selection. Easy to use, with comments.

  • Auto Month
    Apr 19, 2007

    This pulldown menu will automatically adjust the range of months so that the current month is at the top. The remaining months are placed in order after the current month. The menu still functions with JavaScript turned-off.

  • Multi-Value Drop-Down List
    Jay Rumsey Apr 4, 2007

    Using a drop-down menu, this script will provide different values, depending on the user's selection. Easily added to any form.

  • JS Quicktags
    Alex King Mar 28, 2007

    This script will insert HTML tags at the cursor position in IE and Gecko-based browsers (Mozilla, Camino, Firefox, Netscape). For browsers that do not support inserting at the cursor position (Safari, OmniWeb) it appends the tags to the end of the content.

  • HTML Table Filter Generator
    Max Guglielmi Mar 23, 2007

    "This script adds to any HTML table a ""filter by column"" feature that enables users to filter and limit the data displayed within a long table."

  • Live Telephone Number Validation
    Rob Sheldrake Mar 23, 2007

    Simple telephone number validation. This script makes sure the user enters only numbers, brackets, hyphens, or spaces. A plus (+) may be entered as the first character. Just add it to your form validation routine.

  • TextArea Sizer
    Paul Tuckey Mar 12, 2007

    You no longer need to provide large textareas in your forms. This script will resize textarea boxes to fit the text in them.

  • Canadian Sovereignty with Territories Calculator
    William Chinnick Mar 1, 2007

    Here is a little calculator that can educate you about Canada. It includes a novel old Greek Zodiac calendar for star-gazers.

  • Checkbox Validation
    Shaji Kalidasan Feb 24, 2007

    This simple JavaScript validates any number of checkboxes.

  • SpinEdit
    Ron Dresser Feb 22, 2007

    "SpinEdit is a control for setting numbers. "

  • Free Horizontal Scroller and Slider JavaScripts
    vasile barsan Feb 16, 2007

    Horizontal Sliders adjustables: Size,Background and SPEED. Horizontal Scrolling adjustables: Size, Pause, Background and SPEED.

  • Disable Enter Key
    Andrew Samoilov Feb 14, 2007

    Use this script to prevent visitors from submitting a form before it is completely filled-in. Instead of using the enter key to move from field to field, they will need to use either the tab key or the mouse.

  • messages
    Feb 14, 2007

  • Agree Before Entry
    Lee Underwood Jan 26, 2007

    Confirm your visitor's approval by requiring their name before continuing on. Useful if you require your visitors to accept a disclaimer before downloading software or visiting a section of your members-only site. Could be used with a cookie.

  • Accessible Compact Forms
    Mike Brittain Dec 22, 2006

    Tight on space? Use this script to create a compact form that is accessible and works even when JavaScript and CSS are turned off.

  • Floating menu
    Steve S Dec 1, 2006

    "Build floating menu which slide down when you scroll the page so it is always in front of your eyes. It's very convenient. "

  • Replacing Text
    Steve S Dec 1, 2006

    Script replaces the text by typing anithing in a form and submitting the button. If you type nothing in the box, but simply click the button, you will delete the text.

  • Limit Characters and Words Entered
    Will Bontrager Nov 17, 2006

    This script will allow you to limit the number of words and/or characters entered into a form. Easily customizable.

  • Select Box with Options
    Krijn Hoetmer Nov 10, 2006

    Use this script to easily change the order of options in a select box. You can see the order change as it happens in the "New Order" box. (The input can be hidden and used to change the order on the server side.)

  • Ultimate Form Validator
    Oct 27, 2006

    Handle all of your form validation using one script. This one will verify numeric strings; monitor the status of the CapsLock; verify empty strings, numeric, date, alphabetical, or e-mail fields; confirm passwords; verify the formatting of phone numbers; monitor the minimum/maximum numbers of input characters. Includes language-independent error messages and displays error messages in a div or using an alert box.

  • Control Form Elements (Dropdowns)
    Andy Whiting Sep 29, 2006

    This function will automatically select 'no' in the other dropdown if 'yes' is selected and vice versa, regardless of which dropdown is changed. This will make it impossible to select the same option for both dropdowns (as long as JavaScript is enabled).

  • Stop Double Clicking
    Sep 22, 2006

    Wouldn't it be nice if once a user clicked a submit button, we could "turn it off" so that they couldn't click it again? Using this JavaScript snippet, you'll be able to do just that.

  • Textarea Sizer Demo
    Sep 22, 2006

    Wouldn't it be nice if once a user clicked a submit button, we could "turn it off" so that they couldn't click it again? Using this JavaScript snippet, you'll be able to do just that. (09/22/2006)

  • Multiple User Names and Password login
    Jacob Josif Sep 19, 2006

    A script that allows you to add more than one username and password.

  • Personal Details Validation
    Shaun Bailey Sep 15, 2006

    Use this script with your forms to make sure all the fields are filled in. Any fields that are left empty, or are not properly filled in, will be highlighted in red. Fields that are filled in correctly will be properly formatted. Easy to customize.