Form Scripts | JavaScriptSource

Form Scripts

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.

  • Validating an email address in HTML5 by Brad Jones
    Brad Jones May 17, 2012

    Validating an email address in HTML5 is very simple.

  • Jquerytabs
    surya baby b Oct 8, 2011

    Jquerytabs creates a tabbed look with fading and other features shown when switching between tabs.

  • Enter Key Focus
    Scott Clark Dec 5, 2010

    Form users can move to next text field by pressing the enter key.

  • Alert Coords
    Mtalo Toffolo May 29, 2010

    A pop-up alert shows you the coordinates of where the mouse is clicked on the document.

  • Dissappearing Form Values
    Bob KVILL Web Designer 1 Mar 22, 2010

    Sweet easy script that makes <em>your</em> text in a form field go away when <em>user</em> clicks. Check it out!

  • jscolor
    Honza Odvarko Oct 16, 2009

    Simple & user-friendly color mixer for your forms.

  • Adding Options 2
    Carl Leiby Aug 7, 2009

    Add or change options on a form select menu. This script will also allow sub-group items, for additional selections.

  • Row Highlighter
    Gil Davis Aug 1, 2009

    This script will highlight/unhighlight rows in a table utlizing radio buttons.

  • Carpe Slider
    Tom Hermansson Snickars Jul 29, 2009

    This slider is a good alternative to the text input tag, when the expected value is limited to a certain interval and/or when only a limited number of values in the interval are allowed.

  • Form Select Value Set
    Francis Cocharrua Apr 22, 2009

    "This cool function allows users to set the value of a select tag without having to know its position in the list."

  • Textarea Character Limiter
    Will Bontrager Apr 2, 2009

    "Use this script to limit the number of characters that a user can type into your textarea."

  • CSS Border II
    Igor Bushin Mar 3, 2009

    This is a CSS border II that is easy to customize and works in all browsers

  • Dynamic JavaScript Form Validation
    Michael Leigeber Jan 26, 2009

    This lightweight form validation script allows you to easily add attractive validation messages to your forms. There is no markup to add on your existing page. Just call the inlineMsg() function when you wish to display a message. The position of the form element (or any other element) is dynamically calculated.

  • Dynamic Table demo
    Jan 26, 2009

  • Loader frame
    Jan 26, 2009

  • Enable Submit Button
    David Walsh Jan 21, 2009

    This small script will disable the submit button and then re-enable it after a period of time. Useful for preventing duplicate submittals but also allows resubmission, if needed.

  • Item Hider
    Mr. J Jan 14, 2009

    Use this script to hide items in your list.

  • Verify E-mail Address
    William Bontrager Jan 12, 2009

    Collecting e-mail addresses in a form are important as they are generally the only method of contacting the user. This script will verify an e-mail address is entered correctly by requiring the user to re-enter the address, checking to make sure there is no typographical error. This script can also be used for passwords or other information that must be verified before being submitted.

  • Insert Form Fields On Demand
    Nov 5, 2008

    This script will provide additional fields in a form, as needed, on demand. Any number of fields can be added. Easy to customize and implement.

  • TextArea Sizer
    Paul Tuckey Oct 22, 2008

    This script makes your job a little easier by automatically resizing the textarea that your users type in.

  • Dynamic Drop Down List 2
    Jay Rumsey Sep 8, 2008

    This script creates dynamic drop down boxes, preventing duplicate selections. When a selection is made in the first box, that option is removed in the second box, with the same procedure for the third box.

  • Buttons Menu
    Igor Ivanov Sep 3, 2008

    Click a button to display a menu of buttons.

  • Highlighting Links 1
    Igor Ivanov Sep 3, 2008

    Change the color of the text of a link when the mouse hovers over it.

  • Highlighting Links 2
    Igor Ivanov Sep 3, 2008

    Highlight links as you mouse over them.

  • Toggle Additional Info
    Anonymous Aug 28, 2008

    Add this snippet to your forms when you need additional information but don't want to display the input boxes unless it is necessary.