Alphabetical Script Listing for 'S'


This small JavaScript file is used for embedding Adobe Flash content. The script can detect the Flash plug-in in all major Web browsers (on Mac and PC) and is designed to make embedding Flash movies as easy as possible. It is also very search engine friendly, degrades gracefully, can be used in valid HTML and XHTML 1.0 documents, and is forward compatible, so it should work for years to come.

Safe Colors

If you are involved with graphics creation or website design, it's important to understand how colors are seen on different browsers and different platforms. This script will show you all the "safe" colors, the ones that show up the same for all browsers and platforms. So, when you design a site or create an image, be sure to use the "browser-safe" colors! Don't you just love JavaScript?

Sales Tax Calculator

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+

Save and Restore Form Cookies

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.

Scratch Pad

Use this script to allow visitors to jot down their comments on your site, other sites they have visited, or just their notes and ideas. They can even mail you (or anyone for that matter) their scratch pad.

Screen Details

Use this script to show visitors several interesting details about their screen - the screen width, screen height, and screen resolution of their browser window!! You might use this script to suggest that your visitors expand their browser to a larger size before accessing your site, etc.

Screen Percentage

(Requires 4.0+ browsers) Displays what percentage of your screen's total area is being used by the browser window. This script will not even be run and will not cause errors in lower version browsers.

Screen Size

Use this script to show visitors an interesting detail about their screen - the size of their browser window!! You might use this script to suggest that your visitors expand their browser to a larger size before accessing your site.

Scroll Div Horizontal / The JavaScript Source

Create a scrolling DIV on your Web page. You can use text, pictures, and links. Easy to set-up and implement!

Scroll Window

Web sites with heavy content sometimes use anchor links to navigate down the page. The problem with this type of navigation is that the user can become confused. The navigation suddenly disappeared, and the user can be unsure if they were sent to a new page or if the page just scrolled down. This script addresses this problem by animating to the anchor link. Active and visited states are also used to let the user know what content has already been read.

Scrollbar Color

(IE 5.5+) Changes the color of the scrollbars in a page dynamically. Awesome!

Scrollbar Colors ScriptWriter

IE 5.5+ allows you to change the colors of scroll bars in a textarea tag or the browser window. Select the colors you want for the respective scroll bar attributes and see how they will look. Then, switch the "Show Source" to "Yes", re-submit, and the code will appear in a new window. Pretty neat!

Scrollbar Style

This script is simple CSS that allows the user to change the color and shadow properties of the scrollbar. The example here gives a blue background with whtie scrollbar face

Scrolling & Expanding List / The JavaScript Source

This list scrolls within a DIV, and also fully expands. East to implement. Can be used in many different ways.

Scrolling Button Link

This script scrolls a message on a button and then loads a page when clicked.

Scrolling Text Button

Display a scrolling text message on a form button. Completely customizable.

Search Box

This JavaScript search form opens a seperate window where you can select from search engines such as Yahoo!, Excite, and more. Awesome!

Search Engine

This is undoubtedly the most comprehensive JavaScript search engine I have ever seen. You just put in your search term(s), select a few options, and then you have pages of search results! This script truly should be in a class of its own.

Search The Web Script

This JavaScript allows your visitor or customers to search the web from your webpages. Simply, add your search terms, choose a search engine and voila, results open in another window. Add more engines or your own site search engine.

Search the Page

This script will allow your visitors to search a Web page for any matching characters. It can be set for the entire page or within a specific ID attribute. Simple to use and heavily annotated.


Automatically highlight words on a page when that page was reached by a search engine. If you search, for example, Google for some words, and then follow a link from the search results to a searchhi enabled page, the words you searched for will be highlighted on that page.

Select All

Select the text from any form with the click of a button, just as used on the JavaScript Source. Easy!

Select Box Sorter

This script will sort options in a select box. The first select box is the criteria and the second is the select box to be sorted. In short, it takes the options and adds them to an array, then removes the options for the select box, sorts the array then addes the sorted array of options to the select box.

Select Box with Options

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.)

Select One

Limits the number of checkboxes a user may click by deselecting the others upon selection. Cool!

Select Option Navigation Menu

This menu uses a select/option form component to create a drop-down navigation menu. When the user makes the selection, he will be taken directly to that URL. No additional input is required. Any number of menus can be added to a single Web page to create a fast and efficient navigation system.

Select Value Set

This JavaScript function allows you to set the value of a select tag without having to know its position in the list. In the example, type in a letter of the alphabet and then click on the find button.

Select and Auto Copy

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.)

SelectBox Limiter

This JavaScript produces a textarea that you can populate with links or buttons. This script is unique because it allows you to limit the size of your textarea by changing the select tag attributes.

Selection Box

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!

Selection Order

Adjust the order of the items in a selection box and submit them in that order. Neat!

Selection Validation

Use JavaScript to ensure that visitors choose both a radio button and a checkbox. Invalid submissions are cancelled.

Selective Click

This script will allow you to use a single link to run a choice of functions. Can be used for different links or tasks. Easy to use.

Semantic On-Page Tabs

Create links to different topics on one page. Since all of the information is included on the same page, it will still be displayed if JavaScript is turned off. Easy to set-up.

Send This Page

This script opens an e-mail message and inserts the URL and title of the Web page into the body of the message. Additional text can be added to the e-mail message.

Send You Home

This simple little script will send the user back to his/her home page.

Sentence Case

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.

ServerDate to JavaScript

Transfer your server date/time to JavaScript without using Server Side Includes or renaming the page with a .php extension. This script lets you control the initial date/time used by your scripts and makes them independent of the user's local time. Uses JavaScript and PHP.

Set Home Page

(Internet Explorer 5.0+ only) Allow your visitors to quickly and easily change Internet Explorer's default home page to your site's URL with the click of a button! Great for keeping your visitors coming back to your site! Other browsers will not see anything, and will not get any errors.

Set Homepage Link

Allow the visitor to set your site as their homepage with a link. This script works best in Internet Explorer, but also displays the appropriate information based on browser type.

Set Image

Set an image on the page when the cursor is over the link. The image remains set until the user puts their cursor on another link (i.e. no onMouseOut command). Then, the image is updated to the new one. Great!


This script creates rounded corners with a drop shadow without using images. You can use different formats on the same page. Highly customizable. Non-obtrusive.

Shadow Gradient Script

Add a shaded border effect to any valid HTML tag. You can edit the depth, the opacity, and the color of the shadow.

Shadow Text

This little script creates a shadow text. It is simply text that has a shadow behind it.

Shake Me!

EARTHQUAKE!!! That's what you'll be screaming after you see this script.

Shake Screen

California has earthquakes, and so does JavaScript1.2 ! This short JavaScript code will actually shake your browser window by using the moveBy() function, somewhat like a web browser earthquake! Not entirely useful, but neat anyways.

Share A Page

If you would like to have several sites sharing one 'contact us' page, you can! Each site can link to the same page (but each with a unique string) and the appropriate site's information will be highlighted yellow in the contact table. For example, If they clicked on the 'contact us' link on the real estate page, the table cell with the real estate contact email address will be highlighted yellow instead of white on the contact us page. Clever!

Shift It

Play this addictive little JavaScript game - try to put all the pieces in alphabetical order, 'A' through 'O'. Awesome!

Shimmering Links

Spruce up your navigation links with this magical shimmering effect! Works in most any browser.

Show/Hide a DIV / The JavaScript Source

Showing and hiding a DIV using a link can be very useful when it's not necessary to always display information on the Web page. For example, this technique can be used for posting comments on a blog. That way you don't need to use a popup window or a separate page.

ShowDate Function

This script is a great example that shows the date in different formats from one function. Seeing the examples makes this script easy to modify and can be used to help understand the underlying code.

Shy Button

Try to click the wrong answer with this clever script. Fun!


Now you can add links to your Netscape 6 sidebar. Easy!

Simon Says

Recall your childhood with a JavaScript version of Simon Says. Click the buttons in the same order as Simon (the computer) does to advance to the next level. Each level gets increasingly difficult. See how far you can go.

Simple Blockquotes

Use this script to add the proper title and citation to your quotes. Easy to use!

Simple Calendar

This script displays a calendar page of the chosen month and year. The function takes a date object as its parameter. If it is omitted, the calendar will default to the date on the client computer.

Simple Drop-Down Menu

This clean-looking menu is very simple to implement and can be placed anywhere on a page. Adding or deleting levels is easy to do. The menu is created without tables, using unordered lists and hidden layers.

Simple Encoder-Decoder

This is a simple message encoding script. You can encode your message and send it to a friend. He can then decode it using this script. You can also use the script to encrypt your text files. Numbers and special characters are not allowed.

Simple Footnotes

Add footnotes to your Web pages without all the aggravation. This script will pull the notes from your text, add links to them, and format them at the bottom of the page. It will also add a link back to the spot in the text where the note is referenced. Very easy to use.

Simple Image Gallery / The JavaScript Source

Use this script to display images, one at a time, on your Web page. Very easy to set-up, and includes captions.

Simple Info Line

Do you just not like the browser and computer "user agent" line that the web browsers use? This neat script (written by Netscape!) actually converts the user agent line into a more "user friendly" form, indicating the user's computer platform, browser version, and more! Check it out!

Simple Text Rotate

This script will display random text messages, which can be styled using CSS. Add as many as you want.

Simple Thumbnail Solution / The JavaScript Source

Use this script to browse through a series of images. The thumbnail images are displayed, and a larger copy of the selected image is displayed to the right. The selected thumbnail is also highlighted.

Single CLick for Multiple Boxes

This script offers your users the ability to check or uncheck multiple boxes on a form.

Site Search

How would you like a Search Engine for YOUR site? This script does exactly that. Copy the codes to your site, enter the listings information, and you've got your own site search engine!

Site Search Machine

This script creates an internal site search engine for up to 8 web pages on your site, automatically. It indexes webpages and generates a complete file, including the HTML and the JavaScript code for the search. Just fill in the information for each page you wish to add, or even you can paste that page's HTML source code in the textbox and let the script extract the text from it. When you are finished, you will have your own site search script, for free! And, we can even mail the generated code to you! Just upload it as is. Easy! :-)

Sizable Popup Links

This script will call popups from a link. Each popup is sized individually. Can be used more than once on a page.

Slide Down Menu

The slide down menu is composed of a number of menu headers. Upon clicking these headers, its menu items are revealed with a sliding DHTML effect. This script also works in a frameset.

Slide Encryption Program

This is another basic encryption/decryption program. The difference is this script can shift characters based on user input and you can use more than one key making your security even more difficult to break.

Slider Control

A simple slider control made from div tags. It can be displayed vertical, horizontal or XY. Demo is a color picker, demonstrating interaction between two sets of sliders, adjusting HSL and RGB color parameters.

Sliding Text Navigation Menu

This script uses DHTML to create a menu system which contains a large number of links in a relatively small space. Clicking on one of the links will open a sub-menu.

Sliding Window

Slides the browser window off the screen when the link or button is clicked, only to return it to its original location as it loads the link page. Sweet!

Slot machine

This is a simple 3-reel slot machine. The images will change like they are being spun. Works with IE, Netscape, and Opera.

Smart Popup

Create popup windows that will center on your screen or popup near your link without popping off the edge of the screen. Also shows how to create a clickable popup or a popup that displays when you hover over the link with your mouse. Cool!

Smart Pulldown Menu

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!

Smart Tables

This is a framework for developing crossbrowser, W3C compliant, client side projects. This set includes DOMHelper, SmartTables, XMLHelper, SmartTabs, and more.


Color alternate rows, sort rows and columns in ascending or descending order, all by just adding a class name. Easy to use!

Smooth Image Buttons

With this script your buttons can have up to four states: none, over, down, and up. This makes the button feel more real than a simple mouseover. In addition, the different button states are all part of the same background image.

Smut Engine

Use JavaScript to ensure that forms submissions to do not contain words you don't want. It can eliminate dirty words or competitors' names, whatever you want.


(Internet Explorer Only) A one player game where the point is to direct the snake to the apples. For each apple you eat, you earn points and the snake grows longer. Don't run into your own tail or the walls and see how many points you can earn!

Snake Example

(Internet Explorer Only) A one player game where the point is to direct the snake to the apples. For each apple you eat, you earn points and the snake grows longer. Don't run into your own tail or the walls and see how many points you can earn! (09/09/2000)


Put some JavaScript-powered snow on your web site! Dozens of snowflakes carelessly drift back and forth as they float down the browser window. You can even adjust the speed that the snowflakes move. Definitely a cool effect.


One of the main problems with manipulating XML files is the compatibility issue across different browsers. The purpose of the SoftXMLLib Library is to solve the problem of creating different XMLHTTP and XMLDOM objects for different browsers. This library includes basic functions and properties like those already included in Microsoft.XMLDOM ActiveXObject.

Solitaire Poker

This version of Five Card Draw poker uses no images whatsoever. As a result, it loads quite fast. Several parameters in the JavaScript file can be customized to make the game more interesting.

Sort Data Table

Click on the column headings to sort the information in the table. IE 5+ only.

Sort and Lock Table

Easy-to-implement script creates tables that allow the body to scroll while the column headers remain fixed in place. Clicking on any of the column headers will perform a quick client-side sorting on the data in the table.

Sortable Table with Alternating Row Colors

This script will sort tables with ease, creating alternating row colors, as well. Easy to implement.


Due to the different nature that Netscape and other browsers use a background sound, getting it to work for your visitors can be difficult - unless you use this script. It will determine which browser they have and print the background sound command correctly for that browser! Very cool!

Source Viewer

View the source of any web page. This will bypass any 'No right click' scripts on the page. Clever!

Space Trip

Travel through space with this cool background effect. Check it out!

Spaces to Plus Symbol

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.

Spambot Countermeasure

The e-mail address is stored on the server in a disassembled form which is later re-assembled by your browser using Javascript. Spambots merely perform simple text searches for valid e-mail addresses and they will not be able to harvest any e-mail addresses from your webpage. For example: "" is stored in one place, "joe8625" in another, and "@" in yet another. Then, there is a paragraph of programming code that tells your internet browser to assemble the three parts into a clickable link.

Specify Referring Page / The JavaScript Source

Use this script to ensure that a user can only reach a given page from another specified page. Easy to set-up and use.

Speed Up Object Detection

Object detection is common in JavaScript. Browser irregularities mean that your code must sometimes contain branches for different browsers. Use this snippet to perform object detection once instead of every time you call addEvent.

Spinner Data Script

This script creates 2 simulated color spinners. The results of each spin are shown in a pop-up window.

Spreadsheet Cell Bock Parser

This script will take a block of spreadsheet cells and convert them to a 2x2 table object.


Test your strategic ability with this classic example of the game Squares. Be careful, it's very addicting!

Standard or Daylight Time

Is it Standard or Daylight time? This script fills in the correct middle letter of the time zone designation so that either an "S" is shown for Standard, or a "D" for Daylight time. The first function of the script may be used independently if you just need to know in which segment of the year a given date/time is. Adjusted for the new 2007 time changes.

Star Field

Appears as if you are flying through a star field in space. Works in both browsers.


Probably one of the coolest "layers" effects I've seen, stars actually float around the screen and follow your mouse cursor! Looks great on a black or white background, try it with both! Incredible!

State Trivia

Displays trivia facts about any of the 50 states when selected from the pulldown menu. Facts include state capital, date admitted into the union, state flower, and state bird. The script could be modified to display details about products you sell, members in a club, etc. Cool!

Status Bar Date-Time

The script displays the current date and time in the status bar of the browser. It contains a nifty switch which can be altered to adjust the display of either date, time or both! IE only.

Status Bar Scroller

This little snippet adds a welcome message and todays time and date scrolling in the status bar. A nice effect to add to your site.

StatusBar Bounce

This little script is an easy way to put a message in your site's Status bar that's sure to attract attention.

Sticky Note Script

Sticky Note is an attractive DHTML script that pops up at the Sticky Note is an attractive DHTML script that pops up at the center of the page to display anything of your choice. Users can customize, how often the note should appear on the page, for how long, and whether a fade-in effect should be accompanied. Works in MSIE and Mozilla FireFox.

Stop Double Clicking

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.


It's always fun to play with a stopwatch - even in JavaScript! This stopwatch does even include the basic features of Start, Stop, and of course, Reset.

Story Generator

This script allows you to enter your name and gender to have one of over a billion random stories generated about you and your adventures.

Streaming Banners

Add a banner roll to your Web site with this easy-to-use script. Each banner can also include a URL. The size can be set in the script file.

Streaming Horizontal Banner

Add a horizontal banner roll to your Web site with this easy-to-use script. Each banner can also include a URL. The size can be set in the script file.

Strip Characters

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!


Yet another cool "layers" effect, Strobe will fade and and out your message. Very neat!

Stubborn Image

Chase the image across the screen with your mouse, but you will never catch it. Entertaining!

Style Sheet Switcher

When the page loads, this script will detect whether you are using Microsoft Internet Explorer or another browser. It will then load the appropriate style sheet.

Style Sheets by Resolution 2

Loads a style sheet depending on the user's screen resolution. This updated version allows for browser window size to govern text size and background image size for high-resolution displays.

Style Sheets by Resolution 3

This script determines the user's screen resolution and loads an appropriate style sheet. Short and effective!

Style Switcher

Provide your visitors with a method for toggling the text and background colors of your page or certain sections within it. Though simple, this script has a lot of potential and could be greatly expanded. Heavily commented.

Styling abbr in IE

Internet Explorer for Windows does not support the <abbr> element that should be used for proper markup of abbreviations. The solution is based on one simple fact: even though IE ignores the element itself, other elements nested in the <abbr> work fine. This script wraps the content of the <abbr> with <span>, set its title and class attribute and the <abbr> tag behaves like it should.

Subject E-Mail

Let your visitors send you e-mail with a predetermined subject!

Submit Changer

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.

Submit Link

Now you can easily use text or an image as a submit button!

Submit Once

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!

Submit Once for FrontPage

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.

Suggest Messages / The JavaScript Source

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.


Use JavaScript to allow visitors to send your feedback.

Super Edition Menu

This a cross-browser, powerful, simple, and configurable Javascript hierarchy menu.

Sweet Titles

This script will display the titles on your links in a very "sweet" manner. The look is customized by using CSS and is easily changed. Degrades very nicely. Additional modifications are available on Dustin's Web site.

Switchy McLayout

This script and CSS combination allows you to define the dimensions, information richness, and appearance of your content objects for set ranges of screen sizes. A news site, for example, could have one layout and appearance for wide screens, one for medium-sized screens, and another for PDAs. Images could shrink or even disappear according to the screen size, columns could come and go as needed to maintain readability, and you can achieve a more efficient use of the available space for each screen size.

so_createDateDropDown / The JavaScript Source

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.


JavaScript Statements


The Sun-Netscape Alliance, a strategic alliance formed by America Online and Sun Microsystems, Inc., is delivering iPlanet e-commerce software and enterprise solutions that enable companies to compete successfully in the Net Economy


The DevEdge Archive, a strategic alliance formed by America Online and Sun Microsystems, Inc., is delivering iPlanet e-commerce software and enterprise solutions that enable companies to compete successfully in the Net Economy


The DevEdge Archive, a strategic alliance formed by America Online and Sun Microsystems, Inc., is delivering iPlanet e-commerce software and enterprise solutions that enable companies to compete successfully in the Net Economy