Form Scripts - Page 3 | JavaScriptSource

Form Scripts - Page 3

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.

  • Toggle Additional Info
    Nov 9, 2007

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

  • renderSelectOptions
    Wesley Riley Nov 5, 2007

    This script grabs all of the select boxes on the page and renders them in divs at the bottom. Useful when you need to copy options from a select box.

  • Bitmap/Object Script 2
    Fernando Rios Nov 3, 2007

    This script demonstrates the use of bitmasking to store values in a single variable and how to use objects with JavaScript.

  • Bitmap/Object Script
    Fernando Rios Nov 3, 2007

    This script demonstrates the use of bitmasking to store values in a single variable and how to use objects with JavaScript. (11/03/2007)

  • Prevent Web Page Resizing
    Bradley Jones Oct 17, 2007

    Sometimes you want to get rid of the scroll bar on your web page. It is pretty easy!

  • Add-Remove Options (DOM)
    Keith Jenci Aug 31, 2007

    Add or remove objects in a select list, using the DOM. This script was written to work with DOM Level 1 and DOM Level 2 capable browsers, with try/catch logic included for IE use.

  • Disable Radio Button Groups Onload
    Greg Burghardt Aug 24, 2007

    This unobtrusive script will disable groups of radio buttons on the page if one radio button is checked. It works with multiple groups and multiple forms on one page. Buttons are disabled on a group-by-group basis. Easy to use!

  • Block Key Press
    Corneliu Rusu Aug 17, 2007

    Tired of customers using characters that could possibly render your forms useless? This script prevents a user from entering certain special characters in designated form fields.

  • Input Mask
    Baron Schwartz Aug 10, 2007

    This script uses unobtrusive JavaScript to implement "input masks." The maximum field length is automatically limited to the length of the mask. The characters that are entered into the fields are constrained, and separators are automatically added. (No actual validation is done. Check our site for validation scripts.)

  • Items Popup List Modify
    Aug 10, 2007

  • Sentence Case
    Aug 1, 2007

    Use this script to properly format form submissions. The beginning of each sentence will be capitalized, the rest of the sentence will be lower case.

  • Adding Options 2
    Carl Leiby Jul 30, 2007

    Add or change options on a form select menu. This script will also allow sub-group items, for additional selections. (07/30/2007)

  • E-Mail This Page 2
    Jul 25, 2007

    Let your visitors recommend your Web site to their friends. (Requires the use of your visitor's e-mail client.)

  • Auto-Complete
    Paul Avery Jul 18, 2007

    Custom object for auto-complete input boxes.

  • Country State City Drop Down List
    Michael Damato Jul 18, 2007

    This is a simple international country, state, and city drop down list that automatically repopulates the state section based on the country selected, and automatically repopulates the city section based on the state selected. All of this is done without reloading the page. This script could also be used in other formats, e.g., automobiles: type/make/model; or books: publisher/author/title.

  • Clipboard Copy
    Mark O'Sullivan Jul 11, 2007

    There are many scripts for copying text from a Web page that work fine in MS Internet Explorer but not in Firefox, Netscape, or Opera. This cross-browser script, however, will do the trick. It will copy a designated portion of text into the Windows clipboard, using a small Macromedia Flash file to perform the copy on the browser's behalf.

  • Customize Dropdown Menu
    Thai Cao Phong Jul 8, 2007

    Customize Dropdown Menu is designed to display some choices, such as languages, countries, and themes; but it's differrent from the original version in browsers. This tool combines CSS and JavaScript to create a dropdown wherein you can add an image to the title, on every choice.

  • Copy to Page
    Jul 6, 2007

    This snippet will copy text entered into a form field and place it directly on the Web page.

  • Name Capitalization 2
    Will Bontrager Jun 22, 2007

    This script will adjust capitalization of names (actually, the content of any form field you apply to it) so the first letter of each word is capitalized and the rest are lowercase. This is so easy to implement!

  • Html Writer
    john dep Jun 18, 2007

    This will write A Web page from the Html you enter

  • Disable the Submit Button 2
    William Bontrager Jun 13, 2007

    Sometimes it is a good idea to disable the submit button so that the user cannot make multiple submissions. This snippet will do the trick. Very easy to use.

  • Verification Code
    john dep Jun 6, 2007

    You must be verified before submitting a form.

  • Blinking Textbox Effect
    Jun 6, 2007

    This script will place the cursor in a designated textbox, causing its background to blink a specified color for a pre-determined amount of seconds. This will highlight the textbox on the Web page in order to draw attention to it.

  • eMailing Selected Text
    Bradley Jones May 26, 2007

    Set up a simple JavaScript to email text that is selected in the browser.

  • Mailing Selected Text
    Bradley Jones May 25, 2007

    Set up a simple JavaScript to email text that is selected in the browser.