jsCode.com :: home :: index WebMaster Tools
Free NewsTicker Applet
Essential Tips, Tricks, Scripts & Techniques for WebMasters
.
JavaScript Index
.
Alerts & Prompts
Access Control By Screen Size
With an increasing number of standard screen resolutions in use, it's often necessary to do separate designs for each. Use this script to control access and redirect to separate pages based on 640, 800, 1024, or larger screen sizes. The script includes optional alert messages, which can be enabled or disabled via a script variable. Thorough instructions are in the script, and set-up is easy.
.
Amazing Draggable Layer - Use Instead of Popups
This script implements a draggable layer that can be used much like a popup window... but without the usual focus problems that popups often imply. Also included are simple controls to show or hide the draggable layer. Compatible with NS4-7 & IE.
.
Ask Visitor For Name Script
Personalize your page with this very simple paste-it-in script that asks the vistor for his or her name when entering your page, then prints a "Hello" welcome message anywhere you wish in the body of the page. Very easy install for JavaScript newcomers.
.
Auto-Sizing Image Popup Window Script
Use this script to launch a popup window that automatically loads an image and resizes itself to fit neatly around that image. The script also places a title you set in the titlebar of the popup window. Any number of images can be launched from a single instance of the script.
.
Automatic Bookmark Script
This handy bookmark-this-page script automatically grabs the url and title of the page -- so you do not have to set title and address variables for every page that you use it on.
.
Basic No-Right-Click Script with Alert Box
Causes an alert box to be triggered when the visitor right-clicks on the page with the mouse.  Provides simple, though limited, protection of images, etc.
.
Bookmark This Page Script
Automatically opens the Favorites dialog in IE browsers to bookmark your page on the visitor's favorites list.  Degrades gracefully for NS and other browsers.
.
Invoking The SaveAs Dialog From A Web Page
Visitors can save a web page from a link using this script. IE4+ browsers provide a document.execCommand that can call certain system dialogs. This script demonstrates calling the SaveAs dialog to save the page. The script includes onload interlocking and alternate alert messaging for non-IE browsers.
.
Make This Page Your Homepage Script
Opens the Set Homepage dialogue in IE 5 and later browsers, allowing your visitors to set your page as their homepage.  Degrades gracefully in browsers that do not support this feature.
.
No-Right-Click Script Opens Popup Window
Use this script to launch a popup window whenever the right mouse button is clicked. Useful for limited protection of page code and images; and the popup window can contain whatever fulmination on human morals you wish to deliver.
.
Background Effects
2-Way Background Images SlideShow
Unusual script creates an image slideshow in the *background* of the page, underneath the page content. In the first method, the images are discretely positionable in the page space, just like a regular slideshow. In the second method, the slideshow runs with full page-space presentation. An easy install.
.
4-Flasher Background Color Effect
When the page opens, this script rapidly cycles the page background through four different colors and then to the page fixed color. A striking page-opener effect that does *not* depend on MSIE transitions. Easy.
.
Adding A Background Image To A TextArea
Quick, easy way to add an image to the background of a textarea... a great way to dress up an otherwise bland browser page. Stunning effect!
.
Background Color-Change from Link or MouseOver
Use this script to change the color of the page background from a clicked link or on mouseOver. Any number of colors can be used. Shows how to attach to a regular (clicked) link, or how to activate the color change on a mouseOver. Easy.
.
Background Image-Change on MouseOver or Link
Use this script to change the background image used by the page, from a clicked link or on mouseOver. Any number of images can be used. Shows how to attach to a regular (clicked) link, or how to activate the background image change on a mouseOver. Easy.
.
Background-Image Scroller
Use this script for to create a stunning page effect by scrolling the background image underneath your page content. Includes variable scroll speed, and is very simple to install.
.
Changing TextArea Background Images on MouseOver
Use this script to apply a background image to a textarea, and change the image on mouseover. The script can also change the text color in response to the mouseover event. An eye-catching effect, and a very easy install.
.
Email Related
Active Tri-State Roll-Over Images on Form Submit and Reset
Dump the ugly 'gray button' Reset and Submit on forms -- this script shows how to use active tri-state roll-over images, instead. A quick-take tutorial is included, along with images and notes on using styles with form elements for a flashier look and feel.
.
Advanced MailTo Email Link Generator
Use this easy code generator form to quickly create mailto links for your page. You can make mailto links that include To, Cc, Bcc, Subject, and Body material. Multiple email addresses are allowed in the address fields, and a convenient popup window lets you instantly test the code in your default email client. Simply fill in the fields, and then copy-and-paste the code into your html page.
.
Automatic E-mail This Link Script with Auto-Capture and Validation
This script automatically captures the title of the current page and the url of the current page and sends them via the user's e-mail client to an address entered in a box on the form. The e-mail address field is also checked to see that it is not empty, and that the e-mail address is in valid format.
.
E_Cloaker 2.0 Email Address Cloaker
E_Cloaker 2.0 converts email addresses and text into browser-readable Unicode, making it more difficult for spam extractor 'bots to harvest email addresses from your web page. Using Unicoded addresses throughout your site significantly reduces the amount of spam you receive. Free.
.
E-mail Address Checker-Validator
Boilerplate script to check e-mail addresses for all common entry errors.  Uses regular expressions for a short, easy, reliable script to double-validate e-mail addresses.
.
Floating Email-This-Link Script With URL Auto-Capture
This script creates a floating layer with an email-this-link script in it. The layer can be positioned anywhere on the screen, and it will float to that position whenever the window is scrolled. Enter the recipient address and click the send button, and the visitor's email client is opened, complete with a message in the email body that includes the link for whatever page in which the script is placed.
.
Including A Body Message In Your E-Mail Links
A very simple code snippet that shows you how to 'force' a message into the text area (called the 'body' ) of an e-mail when a MailTo link is clicked.
.
Including A Copy-To Address In Your E-Mail Links
This simple code snippet shows you how to send copies of an e-mail off your mailto links to one or more addresses in addition to the main mailto e-mail address. Quite useful when mail from your site needs to go to two or more people... very easy.
.
Including The Subject Line In E-Mail Text & Image Links
It's really simple to add a subject line to the e-mail when visitors click on your e-mail 'mailto' links - and it does help keep things organized when those e-mails arrive in your box with your own pre-formatted subject line message. Super simple.
.
Using Both Subject & Copy-To With E-Mail Links
Shows you how to attach multiple parameters to your e-mail mailto links. Quite easy - but also have a look at other scripts above first.
.
Form Related
1-Click Easy Drop-Down Menues
This simple script creates a drop-down menu that opens pages on a single click when selected from the menu. Pages can open in the same window, a new window, or a target frame. Very easy install, and great for tight spots where you need a menu.
.
Accent JavaScript Web-Based Browser
The Accent JavaScript browser is a complete, basic, fullscreen web-based browser implemented in a JavaScript script set, including the core controls (Location Box with Go button, and Home, Back, Stop, Forward, and Close Buttons). Clean, simple, slick design, this is a solid starting point for building your own site-based browser, and a good demo of basic techniques. Easy to 'rebrand' to your own site. Full code listings are provided, as well as a download 'kit' with all code, ready to run, with no modification needed. Freeware.
.
Access Image URL to TextBox
When an image is clicked, this script will show the image URL in a textbox. Useful for cases where you want others to be able to copy the image address easily for linking... such as for banners, logo graphics, etc. A single instance of the script can be attached to any number of images in the page.
.
Active Tri-State Roll-Over Images on Form Submit and Reset
Dump the ugly 'gray button' Reset and Submit on forms -- this script shows how to use active tri-state roll-over images, instead. A quick-take tutorial is included, along with images and notes on using styles with form elements for a flashier look and feel.
.
Changing TextArea Background Images on MouseOver
Use this script to apply a background image to a textarea, and change the image on mouseover. The script can also change the text color in response to the mouseover event. An eye-catching effect, and a very easy install.
.
E-mail Address Checker-Validator
Boilerplate script to check e-mail addresses for all common entry errors.  Uses regular expressions for a short, easy, reliable script to double-validate e-mail addresses.
.
Floating Email-This-Link Script With URL Auto-Capture
This script creates a floating layer with an email-this-link script in it. The layer can be positioned anywhere on the screen, and it will float to that position whenever the window is scrolled. Enter the recipient address and click the send button, and the visitor's email client is opened, complete with a message in the email body that includes the link for whatever page in which the script is placed.
.
Formatting Background, Font, and Sticky Selection in Dropdowns
This script sets font face, size, color, style and background color in dropdowns. Optionally, you may set sticky selection, which changes the action of the dropdown slightly. Great for getting larger fonts for emphasis or for the visually impaired -- or just to dress up otherwise bland dropdowns.
.
High-Lighting Form Text On Mouse-Click
This simple script set shows how to highlight (select) the text in a form's textarea by clicking on a link. Useful for code listings, order form information, or other material the visitor may wish to copy to the clipboard with Control+C.
.
Invoking The SaveAs Dialog From A Web Page
Visitors can save a web page from a link using this script. IE4+ browsers provide a document.execCommand that can call certain system dialogs. This script demonstrates calling the SaveAs dialog to save the page. The script includes onload interlocking and alternate alert messaging for non-IE browsers.
.
Images & Slide Shows
2-Way Background Images SlideShow
Unusual script creates an image slideshow in the *background* of the page, underneath the page content. In the first method, the images are discretely positionable in the page space, just like a regular slideshow. In the second method, the slideshow runs with full page-space presentation. An easy install.
.
Access Image URL to TextBox
When an image is clicked, this script will show the image URL in a textbox. Useful for cases where you want others to be able to copy the image address easily for linking... such as for banners, logo graphics, etc. A single instance of the script can be attached to any number of images in the page.
.
Active Image Resizing With Drag
This script allows you to resize one or more images on a page by clicking and dragging on the image(s). A single left-click will also reset the image to a default size. Any number of images may be used.
.
Active Tri-State Roll-Over Images on Form Submit and Reset
Dump the ugly 'gray button' Reset and Submit on forms -- this script shows how to use active tri-state roll-over images, instead. A quick-take tutorial is included, along with images and notes on using styles with form elements for a flashier look and feel.
.
Adding A Background Image To A TextArea
Quick, easy way to add an image to the background of a textarea... a great way to dress up an otherwise bland browser page. Stunning effect!
.
Advanced Push-Button Slide Show with Captions & Cross-Fade
A push-button controlled slide show with image captions and fader-effect image transitions. Cross-browser [NS4-7, IE-4&up] cut-and-paste script presents images in a slide show format, controlled by back, home, and forward buttons. Any number of images and captions can be used. Great for JavaScript newcomers, but a solid utility script, too. A download kit of the complete code and images is also available, free, on the site.
.
Advanced Slide Show with Captions & Cross-Fade
Slide show with image captions and fader-effect image transitions. Easy, short, cross-browser cut-and-paste script presents images in a continuous slide show format with accompanying captions. Any number of images and captions can be used, and timing is adjustable. Great for JavaScript newcomers, but a solid utility script, too.
.
Amazing Draggable Slide Show
This script implements a draggable slideshow that can be used much like a popup window, but without the usual focus problems popups imply. Simple controls to show or hide the slideshow are also included, and any number of images can be used. IE browsers show a cross-fade effect between images in the sequence. Compatible with NS4-7 & IE.
.
Auto-Sizing Image Popup Window Script
Use this script to launch a popup window that automatically loads an image and resizes itself to fit neatly around that image. The script also places a title you set in the titlebar of the popup window. Any number of images can be launched from a single instance of the script.
.
Background Image-Change on MouseOver or Link
Use this script to change the background image used by the page, from a clicked link or on mouseOver. Any number of images can be used. Shows how to attach to a regular (clicked) link, or how to activate the background image change on a mouseOver. Easy.
.
Background-Image Scroller
Use this script for to create a stunning page effect by scrolling the background image underneath your page content. Includes variable scroll speed, and is very simple to install.
.
Basic Cross-Browser JavaScript SlideShow
Works on NS3-6, IE-4-6.  Any number of images can be used, and timing is adjustable.  Very easy to set up and use.
.
Changing TextArea Background Images on MouseOver
Use this script to apply a background image to a textarea, and change the image on mouseover. The script can also change the text color in response to the mouseover event. An eye-catching effect, and a very easy install.
.
Dirt-Simple Four-State Mouse-Interactive Image Buttons
Four-state image buttons -- with no multiple images, and no JavaScript?  Darned close!  Plug in a simple style script, attach a few mouse events, and bang -- instant action buttons even most power scripters would sweat to do.  Easy sailing, even for newcomers.
.
Disabling The MyImage Toolbar in IE6+
IE6+ incorporates a new feature called MyImage Toolbar, which, if enabled on Tools>Internet Options, provides the user with a popup menu over images that allows the user to instantly save, print, or email any image in a page. This technical note shows how to disable or enable this feature. Helps stop image theft.
.
Dynamic JavaScript SlideShow [Has Image Cross-Fade Transitions]
Works on NS3-6, IE-4-6.  Any number of images can be used, and timing is adjustable.  In IE browsers, a cross-fade effect occurs between images.  Very easy to set up and use.
.
Easy Random Image Script
Use this script to randomly display a different image each time that the page is visited. Any number of images can be used, and set-up is very easy.
.
Floating Transparent Slide Show
This script creates a floating layer, within which is a sophisticated automatic slide show (including fade transitions) that cycles through the images that you specify. The slideshow layer can be positioned anywhere on the screen, and it will float to that position whenever the window is scrolled. If transparent .gif images are used, the slideshow will run transparently over the page content.
.
Instant Image Zooming - Attach To Any Image
This easy zoom-in/zoom-out script can be attached to any image in your page. The image size will toggle between two sizes you set whenever the image is clicked. The function can be attached to as many images in the page as you wish.
.
Links & Buttons
1-Click Easy Drop-Down Menues
This simple script creates a drop-down menu that opens pages on a single click when selected from the menu. Pages can open in the same window, a new window, or a target frame. Very easy install, and great for tight spots where you need a menu.
.
Automatic Bookmark Script
This handy bookmark-this-page script automatically grabs the url and title of the page -- so you do not have to set title and address variables for every page that you use it on.
.
Change Style Sheets On-The-Fly from Page Links
Use this script to allow visitors to change a page style sheet on-the-fly, by clicking on a link in the page. The script works by switching the active style sheets. You can use any number of style sheets, which are automatically detected by the script. Optional alerts are included. Setup is easy and straightforward. Comes as a complete kit, as well as in the usual listings format.
.
Dirt-Simple Four-State Mouse-Interactive Image Buttons
Four-state image buttons -- with no multiple images, and no JavaScript?  Darned close!  Plug in a simple style script, attach a few mouse events, and bang -- instant action buttons even most power scripters would sweat to do.  Easy sailing, even for newcomers.
.
Easy Instant Interactive Menu Links
Interactive menus are a snap with this easy technique... with over- and under-line motion, settable hot and cold colors, settable movement -- and no layers, spans, or divisions needed.
.
Floating Email-This-Link Script With URL Auto-Capture
This script creates a floating layer with an email-this-link script in it. The layer can be positioned anywhere on the screen, and it will float to that position whenever the window is scrolled. Enter the recipient address and click the send button, and the visitor's email client is opened, complete with a message in the email body that includes the link for whatever page in which the script is placed.
.
Light 'Em Up Multi-Color Interactive Mouse-Over Links
One of the most-asked questions in our support mail, this very simple technique shows how to add differently colored links to the same page that light up and underline and/or overline on mouseOver. No complex JavaScript calls are required, and the technique is a fundamental building block for interesting, interactive, color-differentiated menu systems.
.
Light Up, Super-Easy, Glow-In-The-Dark Links
If you're using MSIE, you've undoubtedly noticed that most of our links 'light up' when you pass your mouse over them. Not only a great effect, it helps users navigate your site more quickly and easily. This script shows you how... and it's surprisingly simple to do!
.
TriState Rainbow Color Link Script
Creates a link that cycles through three colors. Features include settable blink rate; settable blink colors; settable no-blink color; and on/off control via links (optional). A simple function call can also make the link start blinking when clicked, or stop blinking when clicked. A cool way to emphasize critical navigational elements.
.
Menus & Navigation
1-Click Easy Drop-Down Menues
This simple script creates a drop-down menu that opens pages on a single click when selected from the menu. Pages can open in the same window, a new window, or a target frame. Very easy install, and great for tight spots where you need a menu.
.
DropDown Menus That Do PopUps
A simple script that allows you to launch popup windows from a dropdown menu. Any number of links can be added to the options list. The popup window features can be set within the script. Great for saving space on the page when long lists are required, for image popups, and for offsite referrals while still keeping people on your page.
.
Easy Instant Interactive Menu Links
Interactive menus are a snap with this easy technique... with over- and under-line motion, settable hot and cold colors, settable movement -- and no layers, spans, or divisions needed.
.
Formatting Background, Font, and Sticky Selection in Dropdowns
This script sets font face, size, color, style and background color in dropdowns. Optionally, you may set sticky selection, which changes the action of the dropdown slightly. Great for getting larger fonts for emphasis or for the visually impaired -- or just to dress up otherwise bland dropdowns.
.
Glide-In / Glide-Out Menu
When an icon is clicked, this script glides in a menu from screen-left. Clicking on the same icon in the menu causes it to slide off the screen, with the triggering icon sliding back in. The script can be set to have either the trigger icon or the menu show on start-up; and the menu and trigger icon positions can be set via script variables. An easy install, and a cool effect. IE4-6,NS4-6. 
.
Interactive No-Layers Menu Script
A fully interactive menu system with separate message box and programmable elements, including: link color and behavior; link box motion; link box border colors; link box border styles; link box border width; individual link messages; and default link message. Designed to replace costly Java applets that work similarly, the scripting uses no layers or divisions.
.
Light 'Em Up Multi-Color Interactive Mouse-Over Links
One of the most-asked questions in our support mail, this very simple technique shows how to add differently colored links to the same page that light up and underline and/or overline on mouseOver. No complex JavaScript calls are required, and the technique is a fundamental building block for interesting, interactive, color-differentiated menu systems.
.
Light Up, Super-Easy, Glow-In-The-Dark Links
If you're using MSIE, you've undoubtedly noticed that most of our links 'light up' when you pass your mouse over them. Not only a great effect, it helps users navigate your site more quickly and easily. This script shows you how... and it's surprisingly simple to do!
.
TriState Rainbow Color Link Script
Creates a link that cycles through three colors. Features include settable blink rate; settable blink colors; settable no-blink color; and on/off control via links (optional). A simple function call can also make the link start blinking when clicked, or stop blinking when clicked. A cool way to emphasize critical navigational elements.
.
Miscellaneous
2-Way Background Images SlideShow
Unusual script creates an image slideshow in the *background* of the page, underneath the page content. In the first method, the images are discretely positionable in the page space, just like a regular slideshow. In the second method, the slideshow runs with full page-space presentation. An easy install.
.
4-Flasher Background Color Effect
When the page opens, this script rapidly cycles the page background through four different colors and then to the page fixed color. A striking page-opener effect that does *not* depend on MSIE transitions. Easy.
.
Adding A Background Image To A TextArea
Quick, easy way to add an image to the background of a textarea... a great way to dress up an otherwise bland browser page. Stunning effect!
.
Accent JavaScript Web-Based Browser
The Accent JavaScript browser is a complete, basic, fullscreen web-based browser implemented in a JavaScript script set, including the core controls (Location Box with Go button, and Home, Back, Stop, Forward, and Close Buttons). Clean, simple, slick design, this is a solid starting point for building your own site-based browser, and a good demo of basic techniques. Easy to 'rebrand' to your own site. Full code listings are provided, as well as a download 'kit' with all code, ready to run, with no modification needed. Freeware.
.
Accept Focus Until Closed - [Window Control]
This is a simple technique, but one that is asked for very often. When you open a window and wish to keep it 'on top' of all others until closed, all you need do is add this small snippet to the body tag. Demo included.
.
Access Control By Screen Size
With an increasing number of standard screen resolutions in use, it's often necessary to do separate designs for each. Use this script to control access and redirect to separate pages based on 640, 800, 1024, or larger screen sizes. The script includes optional alert messages, which can be enabled or disabled via a script variable. Thorough instructions are in the script, and set-up is easy.
.
Adding An Icon With Your URL - Two Methods
You've probably noticed those cool icons that show up in the URL box and with Favorites (bookmarks) in IE5. Here are two super-easy methods to do it, along with information on icon creation and troubleshooting.
.
Amazing Draggable Layer - Use Instead of Popups
This script implements a draggable layer that can be used much like a popup window... but without the usual focus problems that popups often imply. Also included are simple controls to show or hide the draggable layer. Compatible with NS4-7 & IE.
.
Auto-Sizing Image Popup Window Script
Use this script to launch a popup window that automatically loads an image and resizes itself to fit neatly around that image. The script also places a title you set in the titlebar of the popup window. Any number of images can be launched from a single instance of the script.
.
Automatic Bookmark Script
This handy bookmark-this-page script automatically grabs the url and title of the page -- so you do not have to set title and address variables for every page that you use it on.
.
Background Color-Change from Link or MouseOver
Use this script to change the color of the page background from a clicked link or on mouseOver. Any number of colors can be used. Shows how to attach to a regular (clicked) link, or how to activate the color change on a mouseOver. Easy.
.
Background Image-Change on MouseOver or Link
Use this script to change the background image used by the page, from a clicked link or on mouseOver. Any number of images can be used. Shows how to attach to a regular (clicked) link, or how to activate the background image change on a mouseOver. Easy.
.
Background-Image Scroller
Use this script for to create a stunning page effect by scrolling the background image underneath your page content. Includes variable scroll speed, and is very simple to install.
.
Basic Window Maximizer
Place this simple script in the head of your page. When the page is opened it will reposition and resize to fill the full screen area.
.
Blocking JavaScript Errors
Place this simple script in the head of the page to block JavaScript errors in the page. We've found this useful with page material from sources other than our own that may contain errors (ad banners, automated news feeds, etc.).
.
Capture Mouse X-Y Position [With Mini-Tutorial]
This straightforward, easy script and quick-take mini-tutorial shows how to reliably capture the mouse X and Y positions, dynamically, in NS4-6 and IE 4-6.  Also shows how to display positional values in form fields.
.
Change Style Sheets On-The-Fly from Page Links
Use this script to allow visitors to change a page style sheet on-the-fly, by clicking on a link in the page. The script works by switching the active style sheets. You can use any number of style sheets, which are automatically detected by the script. Optional alerts are included. Setup is easy and straightforward. Comes as a complete kit, as well as in the usual listings format.
.
Changing TextArea Background Images on MouseOver
Use this script to apply a background image to a textarea, and change the image on mouseover. The script can also change the text color in response to the mouseover event. An eye-catching effect, and a very easy install.
.
Disabling The MyImage Toolbar in IE6+
IE6+ incorporates a new feature called MyImage Toolbar, which, if enabled on Tools|Internet Options, provides the user with a popup menu over images that allows the user to instantly save, print, or email any image in a page. This technical note shows how to disable or enable this feature. Helps stop image theft.
.
Formatting Background, Font, and Sticky Selection in Dropdowns
This script sets font face, size, color, style and background color in dropdowns. Optionally, you may set sticky selection, which changes the action of the dropdown slightly. Great for getting larger fonts for emphasis or for the visually impaired -- or just to dress up otherwise bland dropdowns.
.
High-Lighting Form Text On Mouse-Click
This simple script set shows how to highlight (select) the text in a form's textarea by clicking on a link. Useful for code listings, order form information, or other material the visitor may wish to copy to the clipboard with Control+C.
.
Invoking The SaveAs Dialog From A Web Page
Visitors can save a web page from a link using this script. IE4+ browsers provide a document.execCommand that can call certain system dialogs. This script demonstrates calling the SaveAs dialog to save the page. The script includes onload interlocking and alternate alert messaging for non-IE browsers.
.
No-Right-Click Script Opens Popup Window
Use this script to launch a popup window whenever the right mouse button is clicked. Useful for limited protection of page code and images; and the popup window can contain whatever fulmination on human morals you wish to deliver.
.
Mouse Tricks
Access Image URL to TextBox
When an image is clicked, this script will show the image URL in a textbox. Useful for cases where you want others to be able to copy the image address easily for linking... such as for banners, logo graphics, etc. A single instance of the script can be attached to any number of images in the page.
.
Amazing Draggable Layer - Use Instead of Popups
This script implements a draggable layer that can be used much like a popup window... but without the usual focus problems that popups often imply. Also included are simple controls to show or hide the draggable layer. Compatible with NS4-7 & IE.
.
Background Color-Change from Link or MouseOver
Use this script to change the color of the page background from a clicked link or on mouseOver. Any number of colors can be used. Shows how to attach to a regular (clicked) link, or how to activate the color change on a mouseOver. Easy.
.
Background Image-Change on MouseOver or Link
Use this script to change the background image used by the page, from a clicked link or on mouseOver. Any number of images can be used. Shows how to attach to a regular (clicked) link, or how to activate the background image change on a mouseOver. Easy.
.
Basic No-Right-Click Script with Alert Box
Causes an alert box to be triggered when the visitor right-clicks on the page with the mouse.  Provides simple, though limited, protection of images, etc.
.
Capture Mouse X-Y Position [With Mini-Tutorial]
This straightforward, easy script and quick-take mini-tutorial shows how to reliably capture the mouse X and Y positions, dynamically, in NS4-6 and IE 4-6.  Also shows how to display positional values in form fields.
.
Changing TextArea Background Images on MouseOver
Use this script to apply a background image to a textarea, and change the image on mouseover. The script can also change the text color in response to the mouseover event. An eye-catching effect, and a very easy install.
.
Dirt-Simple Four-State Mouse-Interactive Image Buttons
Four-state image buttons -- with no multiple images, and no JavaScript?  Darned close!  Plug in a simple style script, attach a few mouse events, and bang -- instant action buttons even most power scripters would sweat to do.  Easy sailing, even for newcomers.
.
Disabling The Mouse Right-Click Button
Effectively protects your code from prying eyes by disabling the availability of the right-click context menu's View Source option.
.
Disabling The Mouse Left-Click Button
We don't know exactly why you'd want to do this... but someone asked us for it, so here it is.
.
Disabling Both Mouse Buttons
A useful technique for display-only pages, as well as protecting your underlying source code.
.
High-Lighting Form Text On Mouse-Click
This simple script set shows how to highlight (select) the text in a form's textarea by clicking on a link. Useful for code listings, order form information, or other material the visitor may wish to copy to the clipboard with Control+C.
.
Light 'Em Up Multi-Color Interactive Mouse-Over Links
One of the most-asked questions in our support mail, this very simple technique shows how to add differently colored links to the same page that light up and underline and/or overline on mouseOver. No complex JavaScript calls are required, and the technique is a fundamental building block for interesting, interactive, color-differentiated menu systems.
.
Light Up, Super-Easy, Glow-In-The-Dark Links
If you're using MSIE, you've undoubtedly noticed that most of our links 'light up' when you pass your mouse over them. Not only a great effect, it helps users navigate your site more quickly and easily. This script shows you how... and it's surprisingly simple to do!
.
No-Right-Click Script Opens Popup Window
Use this script to launch a popup window whenever the right mouse button is clicked. Useful for limited protection of page code and images; and the popup window can contain whatever fulmination on human morals you wish to deliver.
.
Scroll, Title, and Status Bars
Change Scrollbar Colors Dynamically
Changes the color of the scrollbars in a page dynamically, via a simple JavaScript function; shows how to attach the scrollbar color change function to links and to mouseOver and other events.
.
Changing 5-Color Scrollbars
This striking effect continually and rapidly rotates the colors of IE5.5+ scrollbars through five different colors... speed and colors are settable. Very easy install.
.
Dynamic Title Bar Date-Time Clock
A unique little script that dynamically shows the date and time up top in the Title Bar of the browser in IE4&up and NS6.  (NS3-4 show the date-time in the status bar.)
.
Tristate Rainbow Scrollbars
Causes all page scrollbars to blink in three colors; on/off control (optional) can turn effect on and off via links.
.
Software
Accent JavaScript Web-Based Browser
The Accent JavaScript browser is a complete, basic, fullscreen web-based browser implemented in a JavaScript script set, including the core controls (Location Box with Go button, and Home, Back, Stop, Forward, and Close Buttons). Clean, simple, slick design, this is a solid starting point for building your own site-based browser, and a good demo of basic techniques. Easy to 'rebrand' to your own site. Full code listings are provided, as well as a download 'kit' with all code, ready to run, with no modification needed. Freeware.
.
CodeLifter 5.0 [Page Source-Code Viewing Utility]
With CodeLifter, you can view almost any page source code -- the ultimate tool for viewing page code, even on no-right-click protected pages, referer pages, and more. Free download.
.
E_Cloaker 2.0 Email Address Cloaker
E_Cloaker 2.0 converts email addresses and text into browser-readable Unicode, making it more difficult for spam extractor 'bots to harvest email addresses from your web page. Using Unicoded addresses throughout your site significantly reduces the amount of spam you receive. Free.
.
IE_Kill 2.0 [Desktop Utility - Window Killer]
Great for clobbering runaway pop-ups, or quickly closing multiple IE windows... IE_Kill 2.0 is a simple utility that closes all running instances of Internet Explorer.
.
PopUp Maker [Software Script Generator]
What's that? You say you hate tinkering with popup windows?  A lot of people do... but this tool was built to generate the code for you.  You can download and try the demo here.
.
ScrollBar Styler 5.5 [Generates Style & JavaScript Code]
Make colored, flat-style, and blinking scrollbars... striking effects that definitely get attention. Free demo download.
.
Special Effects
2-Way Background Images SlideShow
Unusual script creates an image slideshow in the *background* of the page, underneath the page content. In the first method, the images are discretely positionable in the page space, just like a regular slideshow. In the second method, the slideshow runs with full page-space presentation. An easy install.
.
4-Flasher Background Color Effect
When the page opens, this script rapidly cycles the page background through four different colors and then to the page fixed color. A striking page-opener effect that does *not* depend on MSIE transitions. Easy.
.
Active Image Resizing With Drag
This script allows you to resize one or more images on a page by clicking and dragging on the image(s). A single left-click will also reset the image to a default size. Any number of images may be used.
.
Adding A Background Image To A TextArea
Quick, easy way to add an image to the background of a textarea... a great way to dress up an otherwise bland browser page. Stunning effect!
.
Amazing Draggable Layer - Use Instead of Popups
This script implements a draggable layer that can be used much like a popup window... but without the usual focus problems that popups often imply. Also included are simple controls to show or hide the draggable layer. Compatible with NS4-7 & IE.
.
Auto-Sizing Image Popup Window Script
Use this script to launch a popup window that automatically loads an image and resizes itself to fit neatly around that image. The script also places a title you set in the titlebar of the popup window. Any number of images can be launched from a single instance of the script.
.
Background Color-Change from Link or MouseOver
Use this script to change the color of the page background from a clicked link or on mouseOver. Any number of colors can be used. Shows how to attach to a regular (clicked) link, or how to activate the color change on a mouseOver. Easy.
.
Background Image-Change on MouseOver or Link
Use this script to change the background image used by the page, from a clicked link or on mouseOver. Any number of images can be used. Shows how to attach to a regular (clicked) link, or how to activate the background image change on a mouseOver. Easy.
.
Background-Image Scroller
Use this script for to create a stunning page effect by scrolling the background image underneath your page content. Includes variable scroll speed, and is very simple to install.
.
Boogey-Down Glow-And-Jump Animated 3-Color Neon Text
This script presents text surrounded by three changing 'glow' colors, while also shifting the vertical and horizontal layout for a striking animation effect strongly resembling neon light displays. Colors, dimensions, and rate are all settable.
.
Change Scrollbar Colors Dynamically
Changes the color of the scrollbars in a page dynamically, via a simple JavaScript function; shows how to attach the scrollbar color change function to links and to mouseOver and other events.
.
Change Style Sheets On-The-Fly from Page Links
Use this script to allow visitors to change a page style sheet on-the-fly, by clicking on a link in the page. The script works by switching the active style sheets. You can use any number of style sheets, which are automatically detected by the script. Optional alerts are included. Setup is easy and straightforward. Comes as a complete kit, as well as in the usual listings format.
.
Changing TextArea Background Images on MouseOver
Use this script to apply a background image to a textarea, and change the image on mouseover. The script can also change the text color in response to the mouseover event. An eye-catching effect, and a very easy install.
.
Dynamic Title Bar Date-Time Clock
A unique little script that dynamically shows the date and time up top in the Title Bar of the browser in IE4&up and NS6.  (NS3-4 show the date-time in the status bar.)
.
Floating Transparent Slide Show
This script creates a floating layer, within which is a sophisticated automatic slide show (including fade transitions) that cycles through the images that you specify. The slideshow layer can be positioned anywhere on the screen, and it will float to that position whenever the window is scrolled. If transparent .gif images are used, the slideshow will run transparently over the page content.
.
Instant Image Zooming - Attach To Any Image
This easy zoom-in/zoom-out script can be attached to any image in your page. The image size will toggle between two sizes you set whenever the image is clicked. The function can be attached to as many images in the page as you wish.
.
Light 'Em Up Multi-Color Interactive Mouse-Over Links
One of the most-asked questions in our support mail, this very simple technique shows how to add differently colored links to the same page that light up and underline and/or overline on mouseOver. No complex JavaScript calls are required, and the technique is a fundamental building block for interesting, interactive, color-differentiated menu systems.
.
Light Up, Super-Easy, Glow-In-The-Dark Links
If you're using MSIE, you've undoubtedly noticed that most of our links 'light up' when you pass your mouse over them. Not only a great effect, it helps users navigate your site more quickly and easily. This script shows you how... and it's surprisingly simple to do!
.
Titlebar Message Ticker
The Title Bar Ticker script shows changing text in a multi-message ticker-type display in the browser title bar. Any number of message lines may be used, and a moving, attention-getting slide box draws the eye to the messages.
.
TriState Rainbow Color Link Script
Creates a link that cycles through three colors. Features include settable blink rate; settable blink colors; settable no-blink color; and on/off control via links (optional). A simple function call can also make the link start blinking when clicked, or stop blinking when clicked. A cool way to emphasize critical navigational elements.
.
Tristate Rainbow Scrollbars
Causes all page scrollbars to blink in three colors; on/off control (optional) can turn effect on and off via links.
.
Text Related
Adding A Background Image To A TextArea
Quick, easy way to add an image to the background of a textarea... a great way to dress up an otherwise bland browser page. Stunning effect!
.
Amazing Draggable Layer - Use Instead of Popups
This script implements a draggable layer that can be used much like a popup window... but without the usual focus problems that popups often imply. Also included are simple controls to show or hide the draggable layer. Compatible with NS4-7 & IE.
.
Boogey-Down Glow-And-Jump Animated 3-Color Neon Text
This script presents text surrounded by three changing 'glow' colors, while also shifting the vertical and horizontal layout for a striking animation effect strongly resembling neon light displays. Colors, dimensions, and rate are all settable.
.
Change Style Sheets On-The-Fly from Page Links
Use this script to allow visitors to change a page style sheet on-the-fly, by clicking on a link in the page. The script works by switching the active style sheets. You can use any number of style sheets, which are automatically detected by the script. Optional alerts are included. Setup is easy and straightforward. Comes as a complete kit, as well as in the usual listings format.
.
Changing TextArea Background Images on MouseOver
Use this script to apply a background image to a textarea, and change the image on mouseover. The script can also change the text color in response to the mouseover event. An eye-catching effect, and a very easy install.
.
Formatting Background, Font, and Sticky Selection in Dropdowns
This script sets font face, size, color, style and background color in dropdowns. Optionally, you may set sticky selection, which changes the action of the dropdown slightly. Great for getting larger fonts for emphasis or for the visually impaired -- or just to dress up otherwise bland dropdowns.
.
High-Lighting Form Text On Mouse-Click
This simple script set shows how to highlight (select) the text in a form's textarea by clicking on a link. Useful for code listings, order form information, or other material the visitor may wish to copy to the clipboard with Control+C.
.
NewsMaker - Smooth News-Ticker Reads From File
NewsMaker is a smooth-scrolling news ticker-scroller that reads its items and links from a text file. Comes with free software tool to make message-and-link file. Supports background images and sound. Automatic headlining, auto-wrapping, text justification, and more. [applet]
.
Titlebar Message Ticker
The Title Bar Ticker script shows changing text in a multi-message ticker-type display in the browser title bar. Any number of message lines may be used, and a moving, attention-getting slide box draws the eye to the messages.
.
Time, Date, Clocks
Automatic Timed Self-Closing Popup Window
Opens a popup window that will close itself after a pre-set time. The popup can be launched from a link in your page, or automatically when the launching page loads. Very well behaved, and does not launch multiple windows on re-clicks.
.
Dynamic Title Bar Date-Time Clock
A unique little script that dynamically shows the date and time up top in the Title Bar of the browser in IE4&up and NS6.  (NS3-4 show the date-time in the status bar.)
.
Flexible JavaScript Date Dislpay
Use this script to display today's date on your web page. The format can be set to show or not show the day with the date; and the color, size, style, and face of the font can be set in the script.
Utilities & Tools
Accent JavaScript Web-Based Browser
The Accent JavaScript browser is a complete, basic, fullscreen web-based browser implemented in a JavaScript script set, including the core controls (Location Box with Go button, and Home, Back, Stop, Forward, and Close Buttons). Clean, simple, slick design, this is a solid starting point for building your own site-based browser, and a good demo of basic techniques. Easy to 'rebrand' to your own site. Full code listings are provided, as well as a download 'kit' with all code, ready to run, with no modification needed. Freeware.
.
Access Control By Screen Size
With an increasing number of standard screen resolutions in use, it's often necessary to do separate designs for each. Use this script to control access and redirect to separate pages based on 640, 800, 1024, or larger screen sizes. The script includes optional alert messages, which can be enabled or disabled via a script variable. Thorough instructions are in the script, and set-up is easy.
.
Adding An Icon With Your URL - Two Methods
You've probably noticed those cool icons that show up in the URL box and with Favorites (bookmarks) in IE5. Here are two super-easy methods to do it, along with information on icon creation and troubleshooting.
.
Automatic Bookmark Script
This handy bookmark-this-page script automatically grabs the url and title of the page -- so you do not have to set title and address variables for every page that you use it on.
.
Basic No-Right-Click Script with Alert Box
Causes an alert box to be triggered when the visitor right-clicks on the page with the mouse.  Provides simple, though limited, protection of images, etc.
.
Blocking JavaScript Errors
Place this simple script in the head of the page to block JavaScript errors in the page. We've found this useful with page material from sources other than our own that may contain errors (ad banners, automated news feeds, etc.).
.
Bookmark This Page Script
Automatically opens the Favorites dialog in IE browsers to bookmark your page on the visitor's favorites list.  Degrades gracefully for NS and other browsers.
.
Capture Mouse X-Y Position [With Mini-Tutorial]
This straightforward, easy script and quick-take mini-tutorial shows how to reliably capture the mouse X and Y positions, dynamically, in NS4-6 and IE 4-6.  Also shows how to display positional values in form fields.
.
Change Style Sheets On-The-Fly from Page Links
Use this script to allow visitors to change a page style sheet on-the-fly, by clicking on a link in the page. The script works by switching the active style sheets. You can use any number of style sheets, which are automatically detected by the script. Optional alerts are included. Setup is easy and straightforward. Comes as a complete kit, as well as in the usual listings format.
.
CodeLifter 5.0 [Page Source-Code Viewing Utility]
With CodeLifter, you can view almost any page source code -- the ultimate tool for viewing page code, even on no-right-click protected pages, referrer pages, and more. Free demo download.
.
Disabling The MyImage Toolbar in IE6+
IE6+ incorporates a new feature called MyImage Toolbar, which, if enabled on Tools|Internet Options, provides the user with a popup menu over images that allows the user to instantly save, print, or email any image in a page. This technical note shows how to disable or enable this feature. Helps stop image theft.
.
E_Cloaker 2.0 Email Address Cloaker
E_Cloaker 2.0 converts email addresses and text into browser-readable Unicode, making it more difficult for spam extractor 'bots to harvest email addresses from your web page. Using Unicoded addresses throughout your site significantly reduces the amount of spam you receive. Free.
.
Formatting Background, Font, and Sticky Selection in Dropdowns
This script sets font face, size, color, style and background color in dropdowns. Optionally, you may set sticky selection, which changes the action of the dropdown slightly. Great for getting larger fonts for emphasis or for the visually impaired -- or just to dress up otherwise bland dropdowns.
.
High-Lighting Form Text On Mouse-Click
This simple script set shows how to highlight (select) the text in a form's textarea by clicking on a link. Useful for code listings, order form information, or other material the visitor may wish to copy to the clipboard with Control+C.
.
Make This Page Your Homepage Script
Opens the Set Homepage dialogue in IE 5 and later browsers, allowing your visitors to set your page as their homepage.  Degrades gracefully in browsers that do not support this feature.
.
PopUp Maker 5.0 [Software Script Generator]
What's that? You say you hate tinkering with popup windows?  A lot of people do... but this tool was built to generate the code for you.  You can download and try the demo here.
.
Print Out The Current Page
This simple script opens the printer dialogue and prints out the current page.  Very useful for information pages, receipt pages, etc.
.
ScrollBar Styler 5.5 [Generates Style & JavaScript Code]
Make colored, flat-style, and blinking scrollbars... striking effects that definitely get attention. Free demo download.
.
Windows & Frames
Accent JavaScript Web-Based Browser
The Accent JavaScript browser is a complete, basic, fullscreen web-based browser implemented in a JavaScript script set, including the core controls (Location Box with Go button, and Home, Back, Stop, Forward, and Close Buttons). Clean, simple, slick design, this is a solid starting point for building your own site-based browser, and a good demo of basic techniques. Easy to 'rebrand' to your own site. Full code listings are provided, as well as a download 'kit' with all code, ready to run, with no modification needed. Freeware.
.
Accept Focus Until Closed - [Window Control]
This is a simple technique, but one that is asked for very often. When you open a window and wish to keep it 'on top' of all others until closed, all you need do is add this small snippet to the body tag. Demo included.
.
Access Control By Screen Size
With an increasing number of standard screen resolutions in use, it's often necessary to do separate designs for each. Use this script to control access and redirect to separate pages based on 640, 800, 1024, or larger screen sizes. The script includes optional alert messages, which can be enabled or disabled via a script variable. Thorough instructions are in the script, and set-up is easy.
.
Amazing Draggable Layer - Use Instead of Popups
This script implements a draggable layer that can be used much like a popup window... but without the usual focus problems that popups often imply. Also included are simple controls to show or hide the draggable layer. Compatible with NS4-7 & IE.
.
Amazing Draggable Slide Show
This script implements a draggable slideshow that can be used much like a popup window, but without the usual focus problems popups imply. Simple controls to show or hide the slideshow are also included, and any number of images can be used. IE browsers show a cross-fade effect between images in the sequence. Compatible with NS4-7 & IE.
.
And Boom - A Big Window [Expanding Window Preloader Effect]
Launches a rapidly expanding window that moves down and across the screen until it fills the entire screen area (IE) in fullscreen mode. The script then loads your content page into the fullscreen view. Neat effect!
.
Auto-Sizing Image Popup Window Script
Use this script to launch a popup window that automatically loads an image and resizes itself to fit neatly around that image. The script also places a title you set in the titlebar of the popup window. Any number of images can be launched from a single instance of the script.
.

Automatic Timed Self-Closing Popup Window
Opens a popup window that will close itself after a pre-set time. The popup can be launched from a link in your page, or automatically when the launching page loads. Very well behaved, and does not launch multiple windows on re-clicks.
.

Basic Window Maximizer
Place this simple script in the head of your page. When the page is opened it will reposition and resize to fill the full screen area.
.
Boinger Window
The Boinger Window script set launches a popup window that continually switches back and forth between two settable sizes. The cycle time is settable. The screen location is also settable and may switch back and forth in the timing cycle. Cool effect, super for making sure visitors don't miss a special announcements or important banner ads!
.
Break Page Out Of Frameset [Frame Buster]
Causes the current page to break out of any frameset it may be captured within.  Prevents your page from being trapped in a frame on another site.
.
Change Style Sheets On-The-Fly from Page Links
Use this script to allow visitors to change a page style sheet on-the-fly, by clicking on a link in the page. The script works by switching the active style sheets. You can use any number of style sheets, which are automatically detected by the script. Optional alerts are included. Setup is easy and straightforward. Comes as a complete kit, as well as in the usual listings format.
.
Closing Windows From Javascript [Six Methods]
This set of short, easy scripts shows six different ways to close a window from JavaScript, including closing windows from a clicked link, a clicked image, or a clicked form button. Special instructions are also included for closing windows comprised of frameset pages.
.
DropDown Menus That Do PopUps
A simple script that allows you to launch popup windows from a dropdown menu. Any number of links can be added to the options list. The popup window features can be set within the script. Great for saving space on the page when long lists are required, for image popups, and for offsite referrals while still keeping people on your page.
.
IE_Kill 2.0 [Desktop Utility - Window Killer]
Great for clobbering runaway pop-ups, or quickly closing multiple IE windows... IE_Kill 2.0 is a simple utility that closes all running instances of Internet Explorer.
.
Floating Email-This-Link Script With URL Auto-Capture
This script creates a floating layer with an email-this-link script in it. The layer can be positioned anywhere on the screen, and it will float to that position whenever the window is scrolled. Enter the recipient address and click the send button, and the visitor's email client is opened, complete with a message in the email body that includes the link for whatever page in which the script is placed.
.
Flying Focused Window Script
The Flying Focused Ad Window script creates a popup window when the launch page loads. The popup slides first down, then across, then up the screen, then back to its starting point. The window maintains focus throughout. Only closing the window returns focus to the launching window. Great for drawing special attention to announcements or banner ads! 
.
Frameless Go-Behind PopUp
Launches a frameless (containerless) "go-behind" popup banner window that cannot be closed unless the banner ad is clicked on. (A no-right-click feature is included in the popup.) The frameless banner window persists, even if the launching browser window is closed. The banner window closes once the banner is clicked.
.
Frameless 'Peeker' PopUp
In IE4 and later, this script launches a type of window ad servers call a 'peeker' popup -- which slowly glides into view from the bottom of the screen. This is a 'frameless' popup window without the Windows frame or titlebar (that is, a "containerless" window) for a clean, non-Windows look. Degrades functionally in other 4.x+ browsers; includes flexible, settable parameters for positioning and control.
.
Frameless Popup Window without Title Bar
Say goodbye to ugly Windows popups! In IE4-6, this script launches a popup window with *no* Windows frame or titlebar (a "containerless" window). In other browsers, it launches a standard popup. Position, width, and height are settable. Automatic closing of the window on leaving the page may also be set.
.
Invoking The SaveAs Dialog From A Web Page
Visitors can save a web page from a link using this script. IE4+ browsers provide a document.execCommand that can call certain system dialogs. This script demonstrates calling the SaveAs dialog to save the page. The script includes onload interlocking and alternate alert messaging for non-IE browsers.
.
PopUp Maker [Software Script Generator]
What's that? You say you hate tinkering with popup windows?  A lot of people do... ut this tool was built to generate the code for you.  You can download and try the demo here.
.
Popup Window from Hell
This short, easy script set launches a window that continually re-opens itself and cannot be permanently closed *unless* the visitor clicks on a link that you provide.
.
No-Right-Click Script Opens Popup Window
Use this script to launch a popup window whenever the right mouse button is clicked. Useful for limited protection of page code and images; and the popup window can contain whatever fulmination on human morals you wish to deliver.
.
Open Page In Frameset
If you have a page that is supposed to open in a frameset, this will force the page to do so.  Solves a common problem where search engines separately list pages that belong in a frame.
.
.
jsCode.com
Essential Tips, Tricks, Scripts & Techniques for WebMasters
.
Copyright 2001-2012 by jsCode.com
All rights reserved
.

CodeBrain InterNET
Group
.
The 2012 Evolution™
.
www.CodeBrain.com www.BrainCode.com www.CodeLifter.com www.MicroTicker.com
www.etLux.com www.OECCorp.com www.CodeBelly.com www.CodeFoot.com
www.jsCode.comwww.Droiddd.comwww.PopUpWorks.comwww.TrayApps.com
.
.
.