Script Categories













JavaScript Forms

Accept Terms. FF1+ IE4+ Opr6+ NN6+
This Script allows your visitors or customers to accept your terms and conditions before proceeding by ticking a Check Box. If they don't agree, an exit box on the form takes them back to the home page.

Agree Before Entry. FF1+ IE4+ Opr6+ NN6+
JavaScript will only let you enter your name in this form if you indicate you agree to the terms by first clicking the I Agree radio button. If you agree, you can enter your name. But, if you disagree, you will not be able to enter or edit your name. When you disagree, the box is 'locked.' Useful if you require your visitors to accept a disclaimer before downloading software or visiting a section of your members-only site.

Aim Message. FF1+ IE4+ Opr6+ NN6+
Send messages to anyone using AOL Instant Messenger.

All Lower Case. FF1+ IE4+ Opr6+ NN6+
Converts a textbox entry to all lowercase letters as soon as they move to the next item in the form (or click the submit button).

All Upper Case. FF1+ IE4+ Opr6+ NN6+
Converts a textbox entry to all capital letters as soon as they move to the next item in the form (or click the submit button).

Anywhere Mail. FF1+ IE4+ Opr6+ NN6+
Use this script to allow visitors to mail anyone, at any time.

Auto Currency. FF1+ IE4+ Opr6+ NN6+
Inserts the proper separators to automatically format any currency field.

Auto Drop Down. FF1+ IE4+ Opr6+ NN6+
Automatically adjusts the values in the selection box depending on the item selected in the drop down menu.

Auto Month. FF1+ IE4+ Opr6+ NN6+
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.

Auto Tab. FF1+ IE4+ Opr6+ NN6+
Automatically sets focus to the next form element when the current form element's maxlength has been reached. This way, the user does not have to manually click in or tab to the next field. This script is perfectly suited for constant-length strings such as a phone number or social security numbers.

Auto Year. FF1+ IE4+ Opr6+ NN6+
This pulldown menu will automatically adjust the range of years depending on the current year. As an added bonus, the range is easily modified.

Basic Validation. FF1+ IE4+ Opr6+ NN6+
The simplest way to require visitors to fill out certain fields is to us this script - just add the word "required" to each required field's name and your visitor must fill it out to submit the form!

Block Key Press. FF1+ IE4+ Opr6+ NN6+
Using the OnKeypress event, you can trap and prevent certain characters (repesented by ASCII decimal codes) from being entered in a form field. Just look up the ASCII code for any other characters you wish to block and add it to the script.

Check Form. FF1+ IE4+ Opr6+ NN6+
This form validation script will place a check in the checkbox next to a textbox in a form if the enty is valid. Includes basic form validation.

Check Entry. FF1+ IE4+ Opr6+ NN6+
Prevents the user from selecting a filename with a space (known to cause problems with some CGI-scripts). The visitor are informed that the field can not have spaces. Of course, you could change the character it checks for as well as the invalid alert message to something else to suit your needs.

Checkbox Counter. FF1+ IE4+ Opr6+ NN6+
Easily count the number of checkboxes that have been selected.

Checkbox Text. FF1+ IE4+ Opr6+ NN6+
The user no longer needs to click precisely on the checkbox to check and uncheck it. Clicking the text after a checkbox can do this just like windows programs.

Checkbox Changer. FF1+ IE4+ Opr6+ NN6+
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.

Commas. FF1+ IE4+ Opr6+ NN6+
Quickly add commas to any numerical form input. Great for displaying large numbers!

Controlled Boxes. FF1+ IE4+ Opr6+ NN6+
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!

Copy Fields. FF1+ IE4+ Opr6+ NN6+
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!

Copy Name. FF1+ IE4+ Opr6+ NN6+
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.

Country. FF1+ IE4+ Opr6+ NN6+
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).

Currency Format. FF1+ IE4+ Opr6+ NN6+
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).

Day Menu. FF1+ IE4+ Opr6+ NN6+
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!

Decimals Allowed. FF1+ IE4+ Opr6+ NN6+
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.

Disable Submit. FF1+ IE4+ Opr6+ NN6+
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.

Dynamic Table. FF1+ IE4+ Opr6+ NN6+
Enter information into this dynamic table and see the power of W3C-DOM compatible browsers.

Dynamic Input. FF1+ IE4+ Opr6+ NN6+
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.

Email Validation Basic. FF1+ IE4+ Opr6+ NN6+
This is a simple e-mail address validation script. While it is not too sophisticated, it does provide the basic validation function.

Email Address Validation. FF1+ IE4+ Opr6+ NN6+
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).

Encode Special Characters. FF1+ IE4+ Opr6+ NN6+
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.

Expanding Textbox. FF1+ IE4+ Opr6+ NN6+
Automatically expands the size of a textbox to fit all of the entered text.

Extract Email. FF1+ IE4+ Opr6+ NN6+
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.

Field Explanation. FF1+ IE4+ Opr6+ NN6+
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.

File Open. FF1+ IE4+ Opr6+ NN6+
This script allows someone to choose a file on their hard drive and open it.

First Form Field. FF1+ IE4+ Opr6+ NN6+
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.

Form Focus. FF1+ IE4+ Opr6+ NN6+
Places the focus on the first editable field in a form on any web page.

Form Swapper. FF1+ IE4+ Opr6+ NN6+
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!

Form Totals. FF1+ IE4+ Opr6+ NN6+
Presents an order form with checkboxes and upates the total price as the user checks and unchecks boxes. The visitor also cannot change the total field. Currently only supports selecting one of each item.

Form Target Formatting. FF1+ IE4+ Opr6+ NN6+
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.

Free Search Engine Optimization tools
Search engine optimization tools could be useful for businesses moving out a search engine optimization operation because of the valuable information they are able to provide. If you are similar to most creative entrepreneurs, you are all the time in the market for tools that will aid you maintain your SEO up to speed.

Format Input. FF1+ IE4+ Opr6+ NN6+
Format the text case inside a form, reverse the text, or see the ASCII code behind the input.

Format Date. FF1+ IE4+ Opr6+ NN6+
Automatically formats date fields as the user enters the information. Also validates the date when complete date has been entered.

Htm Preview. FF1+ IE4+ Opr6+ NN6+
Preview HTML in a new window by entering it into the form. This script allows you to pass anything to a new window.

Ignore Spaces. FF1+ IE4+ Opr6+ NN6+
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.

Initial Caps. FF1+ IE4+ Opr6+ NN6+
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.

Items Popup List. FF1+ IE4+ Opr6+ NN6+
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.

Items List. FF1+ IE4+ Opr6+ NN6+
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.

Limit Textarea. FF1+ IE4+ Opr6+ NN6+
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.

Limit Boxes. FF1+ IE4+ Opr6+ NN6+
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.

Line Wrapper. FF1+ IE4+ Opr6+ NN6+
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.

List Chooser. FF1+ IE4+ Opr6+ NN6+
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). (Start by entering an 'a' to narrow the list)

List Organizer. FF1+ IE4+ Opr6+ NN6+
Easily organize a list of values to place them in any order. Allows you to add and delete from the list!

Locked Textbox. FF1+ IE4+ Opr6+ NN6+
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!

Max Entry. FF1+ IE4+ Opr6+ NN6+
Make sure your visitor doesn't exceed the maximum number of characters that you want to accept in a form. Short too!

Memory Cells. FF1+ IE4+ Opr6+ NN6+
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!

Money Filter. FF1+ IE4+ Opr6+ NN6+
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.

No Duplicates. FF1+ IE4+ Opr6+ NN6+
Prevents you from selecting the same choice when choosing from two different pulldown menus.

No Entry. FF1+ IE4+ Opr6+ NN6+
Use Javascript to ensure that visitors do not leave a form entry blank.

No HTML. FF1+ IE4+ Opr6+ NN6+
Use Javascript to ensure that visitors do not type in HTML entries.

Only One Field. FF1+ IE4+ Opr6+ NN6+
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.

Open Window. FF1+ IE4+ Opr6+ NN6+
Use Javascript to allow visitors to open a customized window.

Option Search. FF1+ IE4+ Opr6+ NN6+
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.

Password Verifier. FF1+ IE4+ Opr6+ NN6+
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.

Radio Totals. FF1+ IE4+ Opr6+ NN6+
Select items in this totals form using checkboxes and radio buttons.

Remove Returns. FF1+ IE4+ Opr6+ NN6+
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.

Replace Characters. FF1+ IE4+ Opr6+ NN6+
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).

Required Fields. FF1+ IE4+ Opr6+ NN6+
Checks form fields to verify that each specified field is not left empty. Displays a warning message if any empty fields are present.

Search Box. FF1+ IE4+ Opr6+ NN6+
This JavaScript search form opens a seperate window where you can select from search engines such as Yahoo!, Excite, and more.

Selection Box. FF1+ IE4+ Opr6+ NN6+
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.

Selection Order. FF1+ IE4+ Opr6+ NN6+
Adjust the order of the items in a selection box and submit them in that order.

Select One. FF1+ IE4+ Opr6+ NN6+
Limits the number of checkboxes a user may click by deselecting the others upon selection.

Select All. FF1+ IE4+ Opr6+ NN6+
Select the text from any form with the click of a button, just as used on the JavaScript Source.

Sentence Caps. FF1+ IE4+ Opr6+ NN6+
Use Javascript to convert entries to sentence caps. Also, this script prevents jokers from typing in all caps.

Smart Pulldown Menu. FF1+ IE4+ Opr6+ NN6+
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.

Smut Engine. FF1+ IE4+ Opr6+ NN6+
Use Javascript to ensure that forms submissions to do not contain words you don't want. It can eliminate dirty words or competitors' names.

Spaces To Plus. FF1+ IE4+ Opr6+ NN6+
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.

Strip Characters. FF1+ IE4+ Opr6+ NN6+
Strips the characters from an input string. You can change the characters you want removed from the string by changing one line of code.


Test your luck with slot machine, where fortunes are a spin away.


©