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.
More on internet.com
Title: ABA Routing Number Checksum Contributor: David Leppek Contributor URL: http://www.azcode.com/ABA Description: 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.)
Title: Accept Terms Contributor: Colin PC Contributor URL: http://www.insighteye.com Description: This script allows your visitors to accept your terms and conditions before proceeding by checking a box. If they don't agree, an exit button will takes them to a designated page.
Title: Accessible Compact Forms Contributor: Mike Brittain Contributor URL: http://www.mikebrittain.com/ Description: Tight on space? Use this script to create a compact form that is accessible and works even when JavaScript and CSS are turned off.
Title: Add-Remove Options (DOM) Contributor: Keith Jenci Contributor URL: http://www.mredkj.com/ Description: 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.
Title: Adding HTML Controls Contributor: Husay Contributor URL: http://www.communitxt.net Description: Use this script to add HTML controls to your forms. This example uses the <input> tag.
Title: Add Input Fields Contributor: Jeroen Haan Contributor URL: http://www.haan.net Description: Use this script to upload files. As a file is selected, another input field is automatically added.
Title: Adding Options Contributor: Rick Johnson Contributor URL: http://www.vistaviews.net/myPage/ Description: Add or change options on a form select menu. Simple script, includes comments.
Title: Adding Options 2 Contributor: Carl Leiby Contributor URL: http://leibys-place.com/ Description: Add or change options on a form select menu. This script will also allow sub-group items, for additional selections.
Title: Agree Before Entry Contributor: Lee Underwood Contributor URL: http://javascript.internet.com/ Description: 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.
Title: Agree Before Posting Contributor: Savvy Contributor URL: WebDeveloper.com Forums Description: Sometimes you may need to make sure your visitors agree to specific terms before submitting their comments. This script will disable the input fields until they agree to your terms. Easily adaptable.
Title: All Lower Case Description: Converts the text to all lowercase letters as soon as focus is removed from the textbox or the submit button is clicked.
Title: All Upper Case Description: Converts the text to all uppercase letters as soon as focus is removed from the textbox or the submit button is clicked.
Title: Anywhere Mail Description: This script will let visitors send e-mail to anyone, at any time.
Title: Auto-Complete Function Contributor: Ilanio Contributor URL: WebDeveloper Forums Description: Create an auto-complete or auto-suggest text box in JavaScript, without use of prototype handlers and other advanced techniques. This script could be adapted for use in a number of different situations.
Title: Auto-Complete Textfield Contributor: Timothy Groves Contributor URL: http://www.brandspankingnew.net/ Description: As the user enters information into a textfield, this script will provide suggestions based on the list in the array.
Title: Auto Currency Contributor: Mario Costa Description: Inserts the proper seperators to automatically format any currency field.
Title: Auto Drop Down Contributor: Jerome Caron Description: Automatically adjusts the values in the selection box depending on the item selected in the drop down menu. Awesome!
Title: Auto Email Link Contributor: CodeLifter.com Contributor URL: http://www.codelifter.com Description: Automatically creates a new e-mail utilizing the user's default e-mail client. The script fills in the subject line and adds the URL of the current Web page to the body. Note: May not be compatible with all e-mail clients.
Title: Auto-Enter Current Date Contributor: Jean P. May, Jr. Contributor URL: http://www.wideopenwest.com/~thebearmay Description: This script will enter the current date in a read only form field. Good for when you want to collect the current date but want to make sure it's formatted properly.
Title: Auto Fill Contributor: Vladimir Geshanov Description: Set a text field value in one window by entering text in another window.
Title: Auto Month Contributors: Fang and Gil Davis
Description: 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. Updated.
Title: Auto Sum Checkboxes Contributor: Jay Rumsey Contributor URL: http://www.nova.edu/~rumsey/ Description: As the user selects items in the form, this script will display a running total automatically. No need to keep reloading the page, and no surprises for your user at the check-out point. Easy to implement into your existing forms.
Title: Auto-Sum Form Boxes Contributor: Jim Stiles Contributor URL: http://www.jdstiles.com Description: This script will automatically total boxes in a form. Use it to keep a running total of quantites or prices in an order form.
Title: Auto Tab Contributor: Cyanide_7 Description: Automatically sets focus to the next form element when the current form element's maxlength has been reached. The user, then, does not have to manually click in or tab to the next field. Very easy to change for different size fields. Perfectly suited for constant-length strings such as a phone number or social security numbers.
Title: Auto Year Contributor: Don Demrow Description: This pulldown menu will automatically adjust the range of years depending on the current year. As an added bonus, the range is easily modified.
Title: Basic Validation Contributor: wsabstract.com Description: This is a simple method to require your visitors to fill out certain fields in a form. Just add the word "required" to each required field's name and your visitor must fill it out to submit the form.
Title: Bitmap/Object Contributor: Fernando Rios Contributor URL: http://www15.brinkster.com/hxedit Description: This script demonstrates the use of bitmasking to store values in a single variable and how to use objects with JavaScript.
Title: Blinking Textbox Effect Contributor: mrhoo Contributor URL: WebDeveloper.com Forums Description: 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.
Title: Block Key Press Contributor: Corneliu Lucian 'Kor' Rusu Contributor URL: corneliulucian[at]gmail[dot]com Description: 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.
Title: Carpe Slider Contributor: Tom Hermansson Snickars Contributor URL: http://carpe.ambiprospect.com/ Description: 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. This cross-browser slider does not contain any image elements or applets. Adding a slider is as easy as adding an HTML element. Settings are easy to modify with a few attributes of the slider element.
Title: Category Form Script Contributor: Vladimir Geshanov Description: Once a main category is selected, a sub-category of that group is loaded for further selection. Great for different brands or subjects.
Title: Character Counter Contributor: Steve Contributor URL: http://jsmadeeasy.com/ Description: Use this script to limit the number of characters allowed in an input box. It will display the number of characters left. Easy to modify.
Title: Check All Contributor: Nannette Thacker Contributor URL: http://www.shiningstar.net Description: Dynamically checks and unchecks all the checkboxes in a form when a button is clicked. Much easier than manually hard-coding the checkbox names.
Title: Check All Toggle Switch Contributor: Hillel Aftel Description: This script adds the "check all" function to a form. Short and easy to use.
Title: Check by Group Contributor: Mike Elkins Description: By utilizing a dropdown box, a user can check a group or subgroups of checkboxes.
Title: Check Cap Locks Contributor: jgw Contributor URL: http://www.csua.berkeley.edu/~jgwang/ Description: If a user enters his password in a Web-based form with [Caps Lock] accidentally on, he can become frustrated because his password is not being accepted, and may assume the script is the source of the problem. This script will let the user know his [Caps Lock] is on and about the potential for error.
Title: Check Entry Description: This script prevents the user from selecting a filename with a space (known to cause problems with some scripts). The visitor is informed that the field cannot have spaces. You could also change the character it checks for to something else to suit your needs.
Title: Check Form Contributor: Chris van Marle Contributor URL: http://www.chrisworld.org Description: This script will place a check in the checkbox next to an input in a form if the entry is valid. Includes basic form validation.
Title: Check/Uncheck Multiple Checkboxes Contributor: Brian McAllister Contributor URL: http://www.frequency-decoder.com/ Description: This script allows for the selection of multiple checkboxes in a form. It create the buttons dynamically with unobtrusive JavaScript.
Title: Checkbox Changer Description: This script takes a series of known named checkboxes and checks or uncheck them all at once. It can even change each checkbox to the opposite checked or not checked value. Clever for loops.
Title: Checkbox Counter Contributor: Alan Gruskoff Contributor URL: http://www.performantsystems.com/ Description: Easily count the number of checkboxes that have been selected.
Title: Checkbox Text Description: The user no longer needs to click precisely on the checkbox to check and uncheck it. Clicking the text after the checkbox will also select it.
Title: Clipboard Copy Contributors: Mark O'Sullivan, Jeff Larson, Mark Percival Description: 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.
Title: Code Box Editor Contributor: Carole Nickerson Contributor URL: http://www.thenetter.com/ Description: A code box where users can edit code and preview their results all on the same page. A great way to offer your code snippets to your visitors.
Title: Confirmable Order Form Description: JavaScript can take the contents of an HTML order form, process them, and display the order for verification even including the grand total! When the user confirms the order by clicking the button, the order is emailed to you by using freedback.com's free form processor cgi script. This script does take a bit of modification, but surely is worth it if you sell anything online.
Title: Control Form Elements (Dropdowns) Contributor: Andy Whiting Contributor URL: http://www.warp-nine.co.uk Description: 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).
Title: Controlled Boxes Contributor: Scott Waichler Description: This script allows checkboxes to check and uncheck based on the selection in another checkbox. If the ALL box is checked, all the other choices go unchecked. If another choice is checked, then the ALL box goes unchecked. Useful when constructing search forms, surveys, and more!
Title: Cookie Form Saver Contributor: Nick Baker Description: This script uses cookies to save information from a form and repopulate the form the next time the user visits.
Title: Copy Contact Info Contributor: Gabe Graves Contributor URL: http://www.gfgraves.com Description: This script lets users enter there information & copy it to a different form on the same page.
Title: Copy Fields Description: Allows the user to click a checkbox on a form to duplicate information. For example, they can copy their billing information into the shipping information fields (assuming they are the same) with one click! Another useful timesaver for your visitors!
Title: Copy Fields 2 Contributor: Will Bontrager Contributor URL: http://www.willmaster.com/ Description: Copy the shipping address fields to the billing address using a checkbox. Simple and easy to implement!
Title: Copy Name Description: Allows the user to enter their name in the first field and have copies it to the second field for use as the User ID. It occurs instantly when they click the next field or the submit button. And, if the user tries to modify the second field, it is changed back to the value of the name field. Definitely a good example of the onChange() event handler in use.
Title: Copy to Page Contributor: Toicontien Contributor URL: WebDeveloper.com Forums Description: This snippet will copy text entered into a form field and place it directly on the Web page.
Title: Country Chooser Description: If you'd like to know where visitors to your site live, add this to your feedback forms. They just choose a region, and the second menu changes appropriately, allowing them to choose their country. (If they choose USA, it allows them to select their state)
Title: Country State Drop Down Contributor: Down Home Consulting Contributor URL: http://downhomeconsulting.com Description: A simple international country and state drop down list that automatically repopulates the state section based on the country selected without page refreshes.
Title: Country State City Drop Down List Contributor: Michael J. Damato Description: 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.
Title: Creating Form Elements Contributor: Matt Murphy Contributor URL: http://www.matts411.com/ Description: This script will generate various bug-free form elements with name attributes, selected options, and more for IE 6+, Firefox, Opera and Safari.
Title: Credit Card Number Validation Contributor: David Leppek Contributor URL: https://www.azcode.com/Mod10 Description: 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.
Title: Currency Fields Contributor: Pavel Donchev Contributor URL: http://chameleonbulgaria.com/ Description: This script will format designated form fields as currency fields. Can be used several times on the page. Automatically does all the formatting. Easy to use!
Title: Currency Format Contributor: Cyanide_7 Contributor URL: http://www7.ewebcity.com/cyanide7 Description: This script accepts a number or string and formats it like U.S. currency. Adds the dollar sign, rounds to two places past the decimal, adds place holding zeros, and commas where appropriate. Occurs when the user clicks the button or when they finish entering the money amount (and click into the next field).
Title: Customized Window Description: Use Javascript to allow visitors to open a customized window.
Title: Date Format Contributor: Oded Arbel Contributor URL: http://geek.co.il/wp/ Description: This JavaScript date library is an extension of the internal Date object, which enables various formatting of date/time values.
Title: Day Menu Description: Do you need your visitors to select a day from this month? Here's an excellent way to do so - they get a pulldown menu containing the entire month and the current day is already selected! Cool!
Title: Date Selection Form Contributor: Satish A Description: This handy script lets you auto-generate the day and year in a drop down selection as well as validate the date. Add it to your pages that require date validation.
Title: Date Sorter Contributor: Patrick Lewis Contributor URL: http://www.PatrickLewis.net Description: This script will sort an array of dates with the month spelled out. It is done by converting the date into a more manageable format.
Title: Decimals Allowed Contributor: Fred Serry Description: Allows the user to enter a number with up to 2 decimal places in a text box. In other words, 99 is ok, 99.9 is ok, 99.99 is ok, but 99.999 is rejected. You can easily change the number of decimal places that are permitted. (i.e. 1, 2, 3, etc.) For the example, enter a number with up to 2 decimal places then try entering one with more than 2 decimal places.
Title: dFilter Contributor: Dwayne Forehand Description: This script will easily allow you to add an input mask to a textbox. The mask for a phone number could look like this for example "(###) ###-####". Just give it a try to see it in action!
Title: Dictionary Contributor: ahmad Contributor URL: http://www.aiboyrocks.com Description: This script defines English words. You put in the word. It gives you the definition. Easy enough! It also includes a thesaurus.
Title: Disable Enter Key Contributor: Andrew G. Samoilov Contributor URL: http://www.webcheatsheet.com/ Description: 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.
Title: Disable Form Buttons Contributor: Justin Barlow Contributor URL: http://www.netlobo.com/ Description: This script will disable your submit button in order to prevent multiple form submissions. Easy to implement.
Title: Disable Form Controls Contributor: Paul McFedries Contributor URL: http://www.mcfedries.com/ Description: Here's a simple form that contains a check box and a text box. Unless the check box is activated, you won't be able to enter anything into the text box.
Title: Disable Radio Button Groups Onload Contributor: Greg Burghardt Contributor URL: WebDeveloper.com Forums Description: 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!
Title: Disable Submit Contributor URL: http://dynamicdrive.com Description: When the form is submitted, any submit and reset buttons are disabled. This prevents the user from submitting the form repeatedly, whether by accident or on purpose. The form will just act normally for Netscape users. Great!
Title: Disable the Submit Button Contributor: William Bontrager Contributor URL: http://willmaster.com/ Description: 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.
Title: Dropdown Box Population (Revised) Contributor: DeWayne Whitaker Contributor URL: http://www.aecdfw.com Description: Multiple series of dropdown boxes (up to 3) are automatically populated based on previous selection. Revised to work with IE, Netscape, Firefox, and Opera.
Title: DynaCalendar Contributor: Michael O'Connell Contributor URL: http://wunder-ful.com Description: A date selection widget for use with forms. Clean and simple. Uses style sheets for layout.
Title: Dynamic Drop Down List Contributor: Sandeep Gangadharan Contributor URL: http://www.sivamdesign.com/scripts/ Description: Use this script when you need to offer multiple choices in your forms. Clicking a link dynamically changes the contents of the accompanying drop down list. Add as many options as you need. Complete details are explained in the script.
Title: Dynamic Drop Down List 2 Contributor: Jay M. Rumsey, OD Contributor URL: http://www.nova.edu/~rumsey Description: 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.
Title: Dynamic Input Contributor: Peter Hermus Description: (Internet Explorer Only) Offer a form with as many input boxes that the user selects. After entering the number of boxes, the form is dynamically updated while the rest of the form remains untouched.
Title: Dynamic JavaScript Form Validation Contributor: Michael Leigeber Contributor URL: http://www.leigeber.com/ Description: 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.
Title: Dynamic Table Contributor: Bob Simpson Contributor URL: http://maryjanebrown.net/webmaster Description: (Internet Explorer 5+ and Netscape 6+ Only) Enter information into this dynamic table and see the power of W3C-DOM compatible browsers. Absolutely Amazing!
Title: Email Address Validation Contributor: Sandeep Tamhankar Description: This is an e-mail address validation function. It allows the usual user@domain syntax, but in addition allows user@[ip] format as well as "User with Spaces"@domain or [ip], all of which are legal syntax, according to W3C. It also checks that the user hasn't done anything silly like having multiple @'s or continuous .'s in the address (e.g. jim@b@c.com and jim@c..b.co.uk).
Title: E-mail Address Validation2 Contributor: Anita Sudhakar Contributor URL: http://www.smartwebby.com/DHTML/email_validation.asp Description: This script verifies the given value as a possible valid e-mail address.
Title: E-mail Director Contributor: Jon Eyrick Description: Use a button or link to send e-mail using the visitor's e-mail program.
Title: Email Domain Description: Takes an email address and returns just the domain - the stuff after the "@" sign. We've put it together with a simple WHOIS query, neat!
Title: E-Mail This Page Contributor: Jim Stiles Contributor URL: http://jdstiles.com/ Description: Let your visitors e-mail your Web pages to their friends.
Title: E-Mail This Page 2 Contributor: Toicontien Contributor URL: WebDeveloper.com Forums Description: Let your visitors recommend your Web site to their friends. (Requires the use of your visitor's e-mail client.)
Title: Email Validation - Basic Contributor: Joshua Hayden Contributor URL: http://webbuildersource.com Description: This is a simple e-mail address validation script. While it is not too sophisticated, it does provide the basic validation function.
Title: Enable Submit Button Contributor: David Walsh Contributor URL: http://davidwalsh.name/ Description: 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.
Title: Encode Special Characters Description: When submitting the form "GET" method, JavaScript can encode special characters with the escape() function. Great! (Enter a nickname or password with some special variables then click 'submit' to see the web address which contains the encoded (%xx) characters.)
Title: Enter Key Focus Contributor: Ritesh Sutaria Description: Form users can move to next text field by pressing the enter key.
Title: Exit Window Description: When a visitor leaves your page, JavaScript can automatically open a new window. Use it to say "thanks for visiting", etc. Very neat! Check it out!
Title: Expanding Textbox Contributor: Robert Khatchadourian Description: Automatically expands the size of a textbox to fit all of the entered text. Internet Explorer Only.
Title: Extended Characters Contributor: Jeffery P. Sanders Contributor URL: http://fp1.centurytel.net/JPS Description: Having trouble remembering the extended character codes? It's now as easy as a press of a button.
Title: External JS Contributor: Jacob Hage Contributor URL: http://www.hagedesign.dk Description: Using an external JavaScript file, simply define the rules for how each field should be validated and you're set. Piece of cake! And since it is it's own .js file, it's easy to use the code on every page of your site. Currently only validates text, numbers and e-mail addresses.
Title: Extract Email Addresses Contributor: Ronnie T. Moore Description: Visitors sometimes include their email address inside the message field when they fill out forms. To deal with this, this script parses through the string and uses a Regular Expression to find then return a comma-separated list of the valid email addresses it finds. Easy!
Title: Field Explanation Description: Opens an explanation window to explain the various fields used in a form on your site when the help link is clicked. You can easily explain various form fields will be used on your site, what type of input is required, or any other information you wish to share. They may also type their entry in the popup window and it will be copied into the form. Great!
Title: Field Show Contributor: Vladimir Geshanov Contributor URL: http://hotarea.com/ Description: Use radio buttons to display a field for your users to add input to your forms.
Title: Field Show 2 Contributor: Fang Contributor URL: WebDeveloper Forums Description: If you need to gather additional information from your visitors/customers, this script will dynamically add an input box directly after a checkbox. This will help to keep your forms neat and clean.
Title: File Open Contributor: Hoop Hooper Contributor URL: http://www.angelfire.com/pa3/muddas Description: This script allows someone to choose a file on their hard drive and open it. Now cross-browser compatible.
Title: First Form Field Contributor: Wayne Nolting Description: This script places the cursor in the first field of a form when the page loads and when the form is reset or cleared. The script works with input types: text, textarea, radio, checkbox, password and Select drop-down boxes.
Title: FilterList Contributor: Patrick Fitzgerald Contributor URL: http://www.barelyfitz.com/webdesign/articles/filterlist/ Description: Finding one item in a long list can be daunting task. Enter FilterList, with this script you can sort the items alphabetically.
Title: Form Field Help Contributor: Uncle Jim Contributor URL: http://jdstiles.com/ Description: Add a help link to each section in your form. When clicked, an explanation is given of what is required and a box is offered where the information can be entered and transferred to the form.
Title: Form Acknowledgement Page Contributor: Enigman Contributor URL: http://members.ozemail.com.au/~enigman/javascript/js_samples.html Description: This page is called by a Javascript function. The purpose is to inform the visitor that their input has been successfully recorded. A button is provided to enable the visitor to close the window for this page and return to the page that created it.
Title: Form Focus Contributor: Lee Underwood Contributor URL: http://javascript.internet.com/ Description: This snippet places the cursor in a selected form field upon page load. It uses the ID attribute, making it easy to target any field, regardless of form changes. Easy to add to any form.
Title: Form Target Formatting Contributor: Cyanide_7 (leo7278@hotmail.com) Contributor URL: http://www7.ewebcity.com/cyanide7 Description: Allows you to format the target window of a form from the form's target property. This allows for the use of window properties, variables, and other data manipulation to effect these options. Great!
Title: Form Screener Contributor: brainycooldude (brainycooldude2002@yahoo.com) Description: Don't want a certain person to fill out a form? Using this script, those people will be rejected after they put their name in.
Title: Format Date Contributor: Richard Gorremans (RichardG@spiritwolfx.com) Contributor URL: http://www.spiritwolfx.com/ Description: Automatically formats date fields as the user enters the information. Also validates the date when complete date has been entered. Cross browser compatible, including Netscape 6+. Great!
Title: Format Input Contributor: Phillip Bryant Description: Format the text case inside a form, reverse the text, or see the ASCII code behind the input. Cool!
Title: Format Phone Number Contributor: Roman Feldblum (web.developer@programmer.net) Description: This script will format a telephone number entered into a text box. Numbers can be entered as 1234567890 and will automatically be formatted as (123)456-7890.
Title: HTML Preview Contributor: nsabs@1nsyncfan.com (nsabs@1nsyncfan.com) Contributor URL: http://www.envy.nu/gjelly Description: Preview HTML in a new window by entering it into the form. This script allows you to pass anything to a new window. Neat!
Title: Highlight Active Input Contributor: Alf Magne Kalleland Contributor URL: www.dhtmlgoodies.com Description: Highlight text inputs in your forms. Make it easy for your visitors to see where they are.
Title: ICD-10 Code Format Validation Contributor: Andreas H�rl Contributor URL: http://www.no-x.net Description: This script validates the entered value to see if it conforms to the ICD-10 format. (It does not check whether the code exists in the ICD-10 WHO library.)
Title: Ignore Spaces Contributor: Mike McGrath (mike_mcgrath@lineone.net) Contributor URL: http://website.lineone.net/~mike_mcgrath Description: Removes spaces from a string variable within a script or from user input into a text box. Several different uses are shown on the script example page.
Title: Image Upload Preview Contributor: Abraham Joffe Contributor URL: http://www.abrahamjoffe.com.au/ Description: 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.
Title: Initial Caps Contributor: William Humphreys (billy@technical-solutions.co.uk) Description: Converts the first letter of each word in a string that the user enters to uppercase. The remaining letters of each word are also changed to lowercase. Very useful when a form requires a title to be submitted in Initial Caps.
Title: Input Box Comments Contributor: Lee Underwood Contributor URL: http://javascript.internet.com/ Description: 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.
Title: Input Box Comments 2 Contributor: Paul Alcock Contributor URL: http://www.ourfaqsite.com Description: Display a few words in a form field and when focus is given to the field, the text will disappear. When the box loses its focus, the original text is reinstated. If new content is entered, the script will preserve it.
Title: Input Mask Contributor: Baron Schwartz Contributor URL: http://www.xaprb.com/ Description: 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.)
Title: Insert Form Fields On Demand Contributor: Bontrager Connection, LLC Contributor URL: http://www.willmaster.com/ Description: 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.
Title: isCurrency Contributor: Derek J. Klingman (dklingman@quantumsoftware.net) Contributor URL: http://quantumsoftware.net Description: This function will take a string value and break it apart and check for valid US currency values. If the string is a valid US currency value the function will return true. If the function encounters an error while validation the function will display a error message to the client and return false.
Title: Items List Description: Javascript can remember a list of several items you enter. Just enter an item and click 'Add to List'. When you are finished, click 'Show List' to see the entries.
Title: Items Popup List Contributor: Pankaj Mittal (pankajm@writeme.com) Contributor URL: http://www.fortunecity.com/lavendar/lavender/21 Description: If you have several items for the user to pick from, you may notice that your page can quickly becomes cluttered. This script helps solve that problem by opening a new window when the user wants to add items to the list. The new window displays the items and passes the selected item information back to the list in the main window. Slick!
Title: JS Quicktags Contributor: Alex King Contributor URL: http://alexking.org/ Description: 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.
Title: JavaScript, DOM, and the Humble Form Contributor: Greg Burghardt Description: So you've got a form on your Web page, and now you want JavaScript to interact with it. This tutorial outlines the various methods used when scripting forms, and explains the Form Document Object Model in detail. Includes code examples of the two main methods with an emphasis on Web standards and best practices.
Title: Limit Boxes Contributor: Glenn Wang (brief@ix.netcom.com) Contributor URL: http://capsule.bayside.net/ Description: Limits the number of checkboxes that the user is able to check on your site. Ideal for situations when more than one selection is allowed up to a certain number overall. If they select too many, they are notified of the maximum allowed and their last entry becomes unchecked.
Title: Limit Characters and Words Entered Contributor: Will Bontrager Contributor URL: http://willmaster.com/ Description: This script will allow you to limit the number of words and/or characters entered into a form. Easily customizable.
Title: Limit Textarea Contributor: Ronnie T. Moore Contributor URL: The JavaScript Source Description: This script controls a maximum textarea input amount and updates a small counter with how many characters are left with each keystroke. Dynamic fix now allows you to use this script in multiple textboxes on a page. Easy!
Title: Limit Textarea 2 Contributor: Ilya Gerasimenko Contributor URL: http://www.gerasimenko.com/ Description: This script limits text input to 20 characters per line for a total of 10 lines. Numbers are adjustable. It also filters textarea input: replaces non-alphanumeric characters with spaces, removes extra spaces (multiple consecutive, leading and trailing) and blank lines. Final clean-up is performed onblur, when user clicks out of textarea.
Title: Line Wrapper Description: Wraps entries in a textarea box to whatever number of characters per line you want. For example, The script can automatically insert a return after each 50 spaces, so that the form contents you receive are more readable. (The script does indifferently break lines in mid-word, a possible fix for the next version?)
Title: List Chooser Contributor: Anand Raman (anand_raman@poboxes.com) Contributor URL: http://www.angelfire.com/ar/diduknow Description: The user can immediately locate what he has been searching for in the long options list just by typing. With each character the user types in the text field, the available items listed are narrowed down (similar to a help file's index feature). Clever! (Start by entering an 'a' to narrow the list)
Title: List Organizer Contributor: Bob Rockers Description: Easily organize a list of values to place them in any order. Allows you to add and delete from the list!
Title: Live Telephone Number Validation Contributor: Rob Sheldrake Contributor URL: http://www.sites4biz.co.uk Description: 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.
Title: Locked Textbox Description: Prevent your visitors from modifying the value stored in a textbox (without using input type=hidden) Just try to change the text in the box! Amazingly, it's a short less than one line script!
Title: Mail - Pick Subject Description: Use Javascript to help organize your visitor e-mail. Visitors pick from several predetermined subjects the most appropriate subject for their e-mail. Visitor are also prompted to reenter information for incomplete or invalid entries. A cookie also records the visitor's name for future e-mails.
Title: Mailing List Description: Use Javascript to sign up visitors for your mailing list. Once again, Javascript ensures that the visitors have filled out the form completely and correctly. Visitors area also prompted to reenter any incomplete or invalid entries.
Title: Max Entry Description: Make sure your visitor doesn't exceed the maximum number of characters that you want to accept in a form. Short too!
Title: Memory Cells Description: Need to save values from a text field off to the side to free up a form for another calculation? This JavaScript lets you do just that!
Title: Menu Swapper Contributor: Phil Webb (phil@philwebb.com) Contributor URL: http://www.philwebb.com Description: Move selected items from one list box to another using "<<" and ">>" direction buttons. It works like database field selection, supports selecting multiple items, and even can sort the moved item into the new list. Newly modified, more efficient algorithm!
Title: Money Filter Contributor: Fred Roberts (fred@gloryofgod.com) Description: Removes the dollar sign ($) and commas (,) from a a text box. Useful if you require input of only numbers. You may also modify the script to filter out whatever characters you want.
Title: Multi-Date Picker Contributor: GShou-Chih, Chu (rainyju@hotmail.com) Description: This script allows you to simply pick dates by clicking the date of the dynamic calendar.
Title: Multi-Value Drop-Down List Contributor: Jay Rumsey Contributor URL: http://www.nova.edu/~rumsey/ Description: Using a drop-down menu, this script will provide different values, depending on the user's selection. Easily added to any form.
Title: Multi-Value Drop Down List 2 Contributor: Kiran Pai Contributor URL: http://www.codecoffee.com/ Description: This script provides a selection in a dropdown menu, determined by the user's previous selection. Easy to implement and customize. Could be used with other dynamic languages, such as JSP or ASP. The arrays could be created by information fetched from a database.
Title: Multiple Mailer Contributor: Jeff Kieke Description: JavaScript can help you send an e-mail to anyone on your "list". Just use the pulldown menu to select a recipient, compose your message, and hit 'Send Message' to send it. This too, is another good JavaScript example for all beginners to learn from.
Title: Multiple Search Engine Contributor: David Coleman (deansuperhero1@aol.com) Contributor URL: http://www.hostcompanies.com/ Description: Over 70 popular and unusual internet search engines in a drop down box. Great little tool to add to a site to help your community grow.
Title: Name Capitalization Contributor: Will Bontrager Contributor URL: http://www.willmaster.com/ Description: 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!
Title: New Window Description: Do you have a link that you'd rather have open in a new window? This little script will do just that! You can even use a button or a text link to open the new window! Check out the example and see what you think!
Title: No Duplicate Selects Contributor: Vic Phillips Contributor URL: http://www.vicsjavascripts.org.uk Description: Prevent a selected option text or value from being chosen in another select box.
Title: No Duplicates Contributor: Denis Dijon Contributor URL: http://213.177.134.20 Description: Prevents you from selecting the same choice when choosing from two different pulldown menus.
Title: No Entry Description: Use Javascript to ensure that visitors do not leave a form entry blank.
Title: No HTML Description: Use Javascript to ensure that visitors do not type in HTML entries.
Title: Number Formatting Contributor: Justin Barlow Contributor URL: http://www.netlobo.com/ Description: These two functions clean up and format numbers quite nicely. One function takes any decimal number, negative or positive, and formats it by adding commas every three digits. The other function strips any non-numeric characters from a string leaving you with a valid decimal number. It considers the minus sign and the period to be numeric and will not strip them unless the minus sign is not at the beginning of the number or there is more than one period. These functions make use of regular expressions to do the heavy lifting.
Title: Numbers Only Contributor: Idocs, Inc. Contributor URL: http://www.idocs.com Description: Use this script to restrict the user from entering anything but numbers in a form field.
Title: onMouseOver Button Contributor: Jezdimir Loncar Contributor URL: http://www.jezdo.net/ Description: When a user moves the mouse over the button, it will change text. When the mouse is moved away, the text will change back. Perfect for adding short instructions on a submit button.
Title: One Check Contributor: Mike Best Description: Only allow one box to be checked out of any number of boxes. Handy for quizzes, etc.
Title: Only One Field Description: The visitor must fill in either one of two fields, their name or email address. If they click in either box the other box's value is erased. Ensures that when the form is submitted only one field contains a value. Also contains validation that makes sure both fields are not empty.
Title: Open Link Contributor: Jason Francis (jasonledoux@msn.com) Contributor URL: http://www.angelfire.com/la3/nosaj/ Description: Add the option of allowing links on your page to be opened in a new window with this powerful script. A simple checkbox toggles between the current and new window. Great!
Title: Option Search Contributor: Darko Egersdorfer (darkoe@za.bynx.com) Description: Allows you to jump to any value in a drop down list. In our example, search for a value between 'a1' and 'a15'. Saves time when it comes to navigating within long pull down menus.
Title: Order Form Contributor: Paul DeBrino Contributor URL: http://infinity-rd.com Description: An order form which utilizes checkboxes and radio buttons for making a selection. The checkbox only allows one quantity of any item to be ordered, while the radio button only allows for one item within a defined group to be ordered. Script updates the order total as the visitor makes his/her selections, also note that the order total can not be manually altered by the visitor. Works in MSIE and Opera.
Title: Outsmart Google's Toolbar Contributor: Jon Jensen Contributor URL: http://code.jenseng.com/google/ Description: Use this script to eliminate the yellow-colored fields in your forms caused by Google's AutoFill feature. Also provides a bit of info for your visitors.
Title: Parse Text Contributor: Chu Alan Contributor URL: http://www.methylated-spirit.com Description: Quickly and easily convert text into a JavaScript string. Neat!
Title: Pass Menu (in frames) Contributor: Ronnie T. Moore Contributor URL: The JavaScript Source Description: After the user selects an option in the pulldown menu in the left frame, JavaScript can pass that option's value into a text box in the right frame when the button is clicked. Cool!
Title: Pass Multiple Values Contributor: Caleb Larsen (caleb@mopedarmy.com) Contributor URL: http://www.wmich.edu/apps/passmultiplevalues.html Description: Values selected from the drop-down box appear in the text area below. As more items are selected they are added to the list.
Title: Pass Textbox (in frames) Contributor: Ronnie T. Moore Contributor URL: The JavaScript Source Description: Copies the text in a box in the left frame into a box in the right frame when the button is clicked. A clever way to pass values in frames.
Title: Passing Values Description: Here is a clever way of 'unwrapping' the contents of a form when passed from one page to the next. This capability would be useful in many situations, such as passing the contents of a form to another page, retaining information about the current page for the rest of their visit, etc. Great!
Title: Password Verifier Contributor: Carey Walker (carey.walker@citicorp.com) Description: Keep your visitors from submitting their form until their "password" and "re-enter password" fields match, for verification purposes. They get an error message telling them to re-enter the passwords if they do not match.
Title: Personal Details Validation Contributor: Shaun Bailey Contributor URL: http://www.sbwebdevelopment.co.uk Description: 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.
Title: The Picklist Script Contributor: Sean Geraty Contributor URL: http://www.freewebs.com/sean_geraty/ Description: This little snippet is a picklist. Add it to your forms to move selections from one column to another.
Title: Pop Over Form Contributor: Roderick W. Divilbiss Contributor URL: http://www.rodsdot.com/ Description: Use this script to create a form that will open on top of the existing page, using a hidden DIV. A default link is included to allow for JavaScript being turned off or unavailable.
Title: Popup Picker Contributor: Shawn A. Mann (dharmamann@hotmail.com) Contributor URL: http://www.laughingshaman.com Description: Select an item from the list and the selected value is passed to the form field of the original window, and the pop-up closes automatically. Useful!
Title: Radio Buttons Contributor: Evaldo Nunes (woodstock@globo.com) Contributor URL: http://www.guianetweb.com.br Description: Tired of the same old ugly radio buttons in your forms? Try this short script. Neat!
Title: Radio Question Validator Contributor: David Blackledge Contributor URL: http://David.Blackledge.com Description: Validates that every Radio Button question on the form has been answered. No modifications needed!
Title: Rank 'em Contributor: Kent Rauch (kent@restekcorp.com) Contributor URL: http://www.restekcorp.com Description: Create a survey asking people to rank things, and this script will validate that everything is ranked, and no rankings are repeated. Could be adapted into a puzzle or game.
Title: RegExp Validation Contributor: Travis Beckham Contributor URL: http://www.squidfingers.com Description: Use this script for form validation using regular expressions. None of the information submitted in the form is saved. Very extensive.
Title: Remove Returns Contributor: Ascii King (chicorama@usa.net) Contributor URL: http://www.geocities.com/enchantedforest/2120 Description: Converts carriage returns in a string to the tag so that the input can be properly displayed in HTML. Without the script, returns in an input field are not preserved when submitting in a form. Useful for guestbooks or other times when a user's input must be preserved.
Title: Remove_XS_Whitespace Contributor: Pat Cahill (patrickcahill@bigfoot.com) Contributor URL: http://www.pcap.org.au/pat/fields.html Description: Strips excess spaces from a field. Users sometimes enter " " in required fields to trick most validation that only checks for "" length fields. This script takes a string and removes the leading and trailing spaces and also any extra spaces in the string. IE only.
Title: Remember Me Contributor: Sandeep Gangadharan Contributor URL: http://www.sivamdesign.com/home/ Description: This script is for use in forms that require user input; e.g., blogs which require users to type their name and e-mail address in order to submit comments. Users will have the option of allowing their information to be remembered. The script uses cookies to store and output the information.
Title: renderSelectOptions Contributor: Wesley Riley Contributor URL: http://picasaweb.google.com/rileywesley Description: 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.
Title: Replace Characters Description: Replaces a character or multiple characters in a textbox when the visitor goes to the next field (or in this example, clicks the submit button).
Title: Required Fields Contributor: Wayne Nolting (w.nolting@home.com) Description: Checks form fields to verify that each specified field is not left empty. Displays a warning message if any empty fields are present. Great!
Title: Resize Form Elements Contributor: Joshua Miller (josh.miller@eagletgi.com) Contributor URL: http://www.eagletgi.com Description: Tired of making all those beautiful, complex HTML forms, only to have them be destroyed when switching between browsers? This script eliminates the frustration by dynamically up-sizing the form elements in Internet Explorer by a specified percent. Use Netscape sizes for your formfields and this script makes them the same size in IE.Sweet!
Title: Return Key Disable Contributor: Volker Schubert (js@volker-schubert.de) Description: This script prevents the "early submitting" of forms by disabling the Return Key in simple Input Tags and allowing it in TextAreas
Title: Sales Tax Calculator Contributor: Gordon Hudson (sales@hostroute.com) Contributor URL: http://www.hostroute.com/ Description: This script adds a fixed percentage to an order total in a form. The percentage added is dependent on the option chosen from a menu. It was written to add sales tax (VAT) to an online ordering system but could be used to add shipping or any other fixed percentage amount. IE, NS6+
Title: Save and Restore Form Cookies Contributor: Tony Davis Contributor URL: http://www.tdavisconsulting.com Description: This script will save all of your form fields in a cookie. It includes all text fields, radio button selections, checkbox values, etc. When your visitor returns, all form fields are automatically repopulated with the same value that they entered on their last visit.
Title: Search Box Contributor: blakethedog@woh.rr.com (blakethedog@woh.rr.com) Description: This JavaScript search form opens a seperate window where you can select from search engines such as Yahoo!, Excite, and more. Awesome!
Title: Select All Description: Select the text from any form with the click of a button, just as used on the JavaScript Source. Easy!
Title: Select and Auto Copy Contributor: Russ (NewXS3@aol.com) Contributor URL: http://dblast.cjb.net Description: With this script you can highlight and copy text in a textarea box with the click of a button. IE only (In Netscape, it only highlights the text; it doesn't copy it.)
Title: Select Box with Options Contributor: Krijn Hoetmer Contributor URL: http://krijnhoetmer.nl/ Description: 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.)
Title: Select One Contributor: Mike Best (mike.best@hei-usa.com) Contributor URL: http://www.hei-usa.com Description: Limits the number of checkboxes a user may click by deselecting the others upon selection. Cool!
Title: Select Value Set Contributor: Francis Cocharrua Contributor URL: http://scripts.franciscocharrua.com/ Description: This JavaScript function allows you to set the value of a select tag without having to know its position in the list.
Title: Selection Box Contributor: Kathi O'Shea (Kathi.O'Shea@internet.com) Contributor URL: http://www.web-savant.com/users/kathi/asp Description: Copy items from one selection box to a second selection box. Selected item values are stored as a string for further manipulation, such as submitted through a form, an alert box, etc. Useful!
Title: Selection Order Contributor: Roelof Bos (roelof667@hotmail.com) Contributor URL: http://www.refuse.nl Description: Adjust the order of the items in a selection box and submit them in that order. Neat!
Title: Sentence Case Contributor: Pittimann Contributor URL: WebDeveloper Forums Description: 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.
Title: Single Click for Multiple Boxes Contributor: Kiran Pai (paikiran@yahoo.com) Contributor URL: http://www.geocities.com/paikiran/articles/9tips.html Description: This script offers your users the ability to check or uncheck multiple boxes on a form.
Title: Smart Pulldown Menu Contributor: Dale Anderson (skinnycowboy@hotmail.com) Contributor URL: http://www.skinnycowboy.com Description: Uses cookies to let a dropdown list remember which option was chosen when a user returns to the page. It comes in very handy if you have a page that is frequently accessed and users tend to repeatedly chose the same option from a list. Cool!
Title: Smut Engine Description: Use Javascript to ensure that forms submissions to do not contain words you don't want. It can eliminate dirty words or competitors' names.
Title: Sort Data Table Contributor: Andrew Berry (aberry@berrysystems.com) Contributor URL: http://www.berrysystems.com Description: Click on the column headings to sort the information in the table. IE 5+ only.
Title: so_createDateDropDown Contributor: Steve Chipman Contributor URL: http://slayeroffice.com/ Description: Returns a SELECT element object with dates from the current date either into the past or the future based on the value of the direction argument. Easy to add to any form.
Title: Spaces to Plus Symbol Contributor: Mike McGrath (mike_mcgrath@lineone.net) Contributor URL: http://website.lineone.net/~mike_mcgrath Description: Replaces single or multiple spaces in a text box entry with plus (+) symbols. Handy if your server's form processing or database management program requires this type of encrypted format.
Title: Stop Double Clicking Contributor: asp101.com Contributor URL: http://www.asp101.com/ Description: 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.
Title: Strip Characters Contributor: Ryan A. Somma (ryan@waygate.com) Contributor URL: http://www.waygate.com Description: Strips the characters from an input string. You can change the characters you want removed from the string by changing one line of code. Very useful!
Title: Submit Changer Contributor: Mike Fernandez Description: Changes the caption of the form's submit button while the form is being submitted. This helps eliminate the confusion that can sometimes occur when a form takes quite a while to be processed by the server.
Title: Submit Link Contributor: D Antonacci (DAntonacci@codeave.com) Contributor URL: http://www.codeave.com Description: Now you can easily use text or an image as a submit button!
Title: Submit Once Description: Do you ever receive multiple copies of a single form submission? Do your visitors click the submit button over and over, hoping it will hurry up the process? Well, JavaScript can solve your problems! The script will prevent the visitor from submitting the form after the first submission. Basic field validation also included! Great!
Title: Submit Once for FrontPage Contributor: Douglas Nelson (silentdoug@bigfoot.com) Contributor URL: http://frontpage.home.net/silentdoug/ Description: A script that only allows the user to submit a form once. Compatible with Microsoft FrontPage's built-in validation methods, which other 'Submit Once' scripts are not. It spoofs FrontPage by dynamically re-writing the onSubmit handler in the user's browser.
Title: Suggest Messages Contributor: Antonio Lupetti Contributor URL: http://woork.blogspot.com/ Description: This script will display information when a field is selected with the cursor. An excellent method for providing additional or important instructions to your visitors. Easy to implement.
Title: Suggestions Description: Use Javascript to allow visitors to send your feedback.
Title: Tab Key Emulation Contributor: Ronnie T. Moore Contributor URL: The JavaScript Source Description: The tab key is no longer required to tab between fields. The user can go to the next form field just by pressing the enter key instead of the tab key. Useful with 10-key form input. What a time saver!
Title: TextArea Sizer Contributor: Paul Tuckey Contributor URL: http://tuckey.org/ Description: You no longer need to provide large textareas in your forms. This script will resize textarea boxes to fit the text in them.
Title: TextBox Expander Contributor: Michael P. Hemmes (trueluck3@hotmail.com ) Contributor URL: TextBox Expander Description: I get annoyed when I'm trying to fill in a form and I have to scroll left or right to see what I've typed. This little script puts an end to that. The amazing expanding text box!
Title: Text Cycler Contributor: James Gough (wheresjim@hotmail.com) Contributor URL: http://www.esprinkles.com Description: Use the Up and Down arrows while in the text box to cycle through your choices. InternetExplorer users can go up and down through the list, Netscape users can only go down through the list. Neat!
Title: Text Limit Contributor: Mr. J Contributor URL: http://www.huntingground.net Description: This script will only allow a set number of characters to be entered into a text field and then focus on the next element. Easy to implement.
Title: Text Reverser Description: JavaScript will take the contents of a box and reverse it! If you entered 'hello' it will change the box to say 'olleh'. This might be useful on your site in a form or just for fun.
Title: Tigra Form Validator Contributor: Tigra Support (support@softcomplex.com) Contributor URL: http://www.softcomplex.com Description: Tigra Form Validator is free JavaScript component performing client side form validation. With this feature set the script can be used with HTML forms of virtually any complexity.
Title: Time Out Contributor: Sergio Mottura (sergio1@onebox.com) Contributor URL: http://www.bassprotips.com Description: Limit the time allowed for form input with this short script. Easy!
Title: Toggle Additional Info Contributor: Anonymous Contributor URL: http://javascript.internet.com/ Description: 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.
Title: Trim Leading Spaces Description: A super-easy script which eliminates any extra leading spaces entered inside a textbox. To check it out in action, try entering a few spaces before the text in the box.
Title: Trim Trailing Spaces Description: A super-easy script which eliminates any extra trailing spaces entered inside a textbox. To check it out in action, try entering a few spaces after the text in the box.
Title: True Date Selector Contributor: Lee Hinder (lee.hinder@ntlworld.com) Contributor URL: http://www.cl2000.co.uk/mrlee/js/truedateselector.htm Description: This script helps to insure the integrity of the date entered in drop-down menus. Dates, such as Feb 31st can't be selected. Today's date is automatically selected.
Title: UK Postcode Validation Contributor: Peter Haydon (peter_haydon@lineone.net) Contributor URL: http://newportpagnell.cjb.net/ Description: Checks that postcodes are in correct format. Is written for UK format, but is easily adapted for other countries.
Title: Ultimate Character Counter Contributor: kojak Contributor URL: http://commoncoder.com Description: This script limits the length of multiple form fields and updates the screen as information is entered. It can easily be added to an existing script.
Title: Ultimate Form Validator Contributor: Viala Contributor URL: http://www.viala.hu Description: 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.
Title: Undo-Redo Contributor: Turnea Iulian Contributor URL: http://www.eurografic.ro Description: 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.
Title: Universal Form Validator Contributor: Amit Wadhwa Contributor URL: http://amitwadhwa.fcpages.com/javascript.com/formvalidator.html Description: Validate form elements of all kinds: select boxes, text fields (including spaces), radio buttons, force numbers in textfields, etc. Very easy to use. Can be used on all forms.
Title: Unobtrusive Dynamic Select Boxes Contributor: Bobby van der Sluis Contributor URL: http://www.bobbyvandersluis.com/ Description: 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.
Title: Update Order Form w/o Page Refresh Contributor: Kevin Hartig Contributor URL: http://www.grafikfx.net/ Description: 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.
Title: Upload Filter Contributor: ArjoGod, Shauna Merritt Description: Allowing visitors to upload files through web forms on your site is useful, but how do you limit the types of files they can upload? This script only allows visitors to upload files that end with the file extensions you want, such as .gif and .jpg, etc. Easy!
Title: User Management Contributor: Sergei Kouzminiov (sergei.kouzminov@sympatico.ca) Description: Use this script to add and subtract items in different fields. Changes made can be displayed for each field.
Title: Validate Date Contributor: Torsten Frey (tf@tfrey.de) Contributor URL: http://www.tfrey.de Description: This is a simple date validation. The script is written for the European format (ddmmyy), but can easily be changed.
Title: Validate E-Mail Contributor: Francis Cocharrua Contributor URL: http://scripts.franciscocharrua.com/ Description: This script verifies that a string looks like a real e-mail address.
Title: Validate Numeric Only Contributor: Manzi Olivier Contributor URL: http://www.imanzi.com/ Description: This script verifies that a string is numeric, otherwise it deletes the non-numeric character.
Title: Validation Description: Let Javascript help you receive feedback from your visitors. The script also requires that all fields must be completed before the form is submitted. Great!
Title: Validation (Character) Contributor: Mikhail Esteves (miks80@yahoo.com) Contributor URL: http://www.freebox.com/jackol Description: Automatically removes specified characters from input box. Good for fields that require only text/number inputs. Easily modified to accept only text or only numerals.
Title: Validation (Cookie) Description: Use Javascript to ensure that all elements of a form are properly filled out before mailing.
Title: Validation (Credit Card) Contributor: Simon Tneoh (tneohcb@pc.jaring.my) Description: Determines if a credit card number is valid before the form is submitted by utilizing the LUHN formula. Very simple, and does not require knowledge of the credit card type. Does not check if the date is valid. Ver useful for online order form validation. Note: Although this form does not capture your credit card information, if you do not feel comfortable entering your credit card number to test this script, please DO NOT !
Title: Validation (Date) Contributor: Mike Welagen (welagenm@hotmail.com) Description: Dates are validated and formatted in your form. Supports over a dozen different date formats, and formats the date properly in United States or European date formatting styles depending on how the script is configured. A dateCheck function also is included if you wish to compare two dates. Wow!
Title: Validation (Universal Date) Contributor: Sandeep Tamhankar (stamhankar@hotmail.com) Description: Validate dates in your form using this universal script. Will work with any date format and the code is fully commented for easy modification. Great!
Title: Validation (Guestbook) Description: Use Javascript to ensure that all elements of a form are properly filled out before mailing.
Title: Validation (Information) Description: Test the powers of Javascript. Watch as Javascript tells you if information about you is valid or not.
Title: Validation (IP Address) Contributor: Jay Bienvenu Contributor URL: http://www.bienvenu.net Description: Verify the value of an IP address. Check for special cases such as "0.0.0.0" and "255.255.255.255". Cool!
Title: Validation (No Alert) Contributor: Jeff Harding (jbh@site-ations.com) Contributor URL: http://www.site-ations.com Description: Stop displaying those annoying alert boxes with your JavaScript form validation. This script uses images to display any error messages to the user, cool!
Title: Validation (Num. or Chars) Description: Validates an input field to make sure that only a number or character is entered. If you enter a number or a letter everything you can continue on. But, try entering another value like an exclamation point (!), an ampersand (&), or a dollar sign ($) and see what happens. It even highlights the incorrect entry field for you. Nice!
Title: Validation (password) Contributor: Russ Swift (rswift220@yahoo.com) Description: This script works like our Password Verifier, however, it also checks for a minimum length and invalid characters.
Title: Validation (Selection) Description: Use Javascript to ensure that visitors choose both a radio button and a checkbox. Invalid submissions are cancelled.
Title: Validation (SSN) Contributor: Sandeep V. Tamhankar (stamhankar@hotmail.com) Contributor URL: http://207.20.242.93 Description: Input the Social Security Number using either the 9 digit or NNN-NN-NNNN format. The number ranges can be easily changed by the S.S.A, so this is not checked.
Title: Validation (Time) Contributor: Sandeep Tamhankar (stamhankar@hotmail.com) Contributor URL: http://207.20.242.93 Description: This function verifies that a string is a valid time, in the form hh:mm:ss am/pm, where seconds are optional. It accepts military time (hour between 0 and 23) as long as am/pm isn't specified. It requires am/pm when the hour is less than or equal to 12.
Title: Validation (Zip Code) Contributor: Brian Swalwell Description: Ensure that your visitors enter a properly formatted 5 digit, or 5 digit+4 zip code. The visitor is alerted if any information is invalid and asked to try again. Cool!
Title: Verify E-mail Address Contributor: William Bontrager Contributor URL: http://www.willmaster.com/ Description: 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.
Title: Verify/Notify for Duplicate Fields Contributor: Patrick Fitzgerald Contributor URL: http://www.barelyfitz.com/ Description: When requesting certain information, such as an e-mail address or a password, it's usually best to have the user enter the information twice in order to verify that a typing error did not occur. This script will do just that, and will provide a message for your user that it has been done.
Title: Virtual Keyboard Interface Contributor: GreyWyvern Contributor URL: http://www.greywyvern.com/ Description: This script is a reusable system for adding a graphical keyboard interface to text fields, password fields, and textareas so they can be filled with mouse only. It also adds easy access to special characters your existing keyboard may not otherwise have the ability to generate. Comes with Arabic, Belgian, Dutch, Dvorak, French, German, Greek, Hebrew, Hungarian, Italian, Lithuanian, Norwegian, Number Pad, Polish Programmers, Portuguese, Russian, Slovenian, Spanish (Spain), Turkish-F, Turkish-QWERTY, UK, US Standard and US International keyboard layouts, dynamically selectable. Add additional layouts is simple. Easily implemented on any Web site.
Title: Word Count Contributor: Shawn Seley Description: Finally, an easy way to count the number of words that are entered into a form!
Title: Word Counter Contributor: Patrick Lewis (gtrwiz@aol.com) Contributor URL: http://www.patricklewis.net/ Description: This is a handy script that counts the words (or characters) entered into a textarea and limits it to 100 words or less (this can be changed).
Title: Word Filter Contributor: Premshree Pillai (premshree@hotmail.com) Contributor URL: http://www.qiksearch.com/ Description: This form validator filters pre-selected words in a text box. When the user submits text, the validator will check the words against the list of banned words.
Title: Zip to State Contributor: Daniel Dailey (jesusfreak@cyberdude.com) Description: Enter your five digit zip code and press tab to have the script display your state automatically. Piece of cake!
JavaScript® is a registered trademark of Sun Microsystems, Inc.
Jupitermedia's Database Journal offers SQL courses and other database related resources for beginner to expert developers.
|
|