Path = Home : Webmaster Resources : JavaScripts : Free Alerts and Prompts JavaScripts
Free Alerts and Prompts JavaScripts
Use these javascripts to make a small box pop-up to alert or prompt for your visitor to enter some information before they can proceed.
Note: Only use these when you really need to as many people find them extremely annoying. - For example, you have probably seen prompts (usually on parked domains) to try and get you set your homepage to the site that you are currently visiting.
Document OnUnload
Displays a message when a visitor decides to leave a page containing the script. When the visitor tries to go to another page, a confirm box comes up asking them if they really want to leave. If they say no, then the script will reload the current page (sorry, no way around that).
Browsers: All
Version: N/A
Status: Free with copyright notice
Visit the Author's website - Is this link dead or broken? -
Report it ( will open in new window )Alert Box 1
Alert box...simple, and useful to remind your visitor's of something!
Browsers: All
Version: N/A
Status: Free with copyright notice
Visit the Author's website - Is this link dead or broken? -
Report it ( will open in new window )Basic No-Right-Click Script With Alert Message
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.
Browsers: NS & IE 4.0 & later; degrades gracefully
Version: N/A
Status: Free with copyright message
Visit the Author's website - Is this link dead or broken? -
Report it ( will open in new window )Amazing Draggable Layer
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.
Browsers: NS4-7 & IE4 and later
Version: N/A
Status: Free with copyright notice
Visit the Author's website - Is this link dead or broken? -
Report it ( will open in new window )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.
Browsers: NS3-6, IE4-6
Version: N/A
Status: Free with copyright notice
Visit the Author's website - Is this link dead or broken? -
Report it ( will open in new window )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.
Browsers: All
Version: N/A
Status: Free with copyright notice
Visit the Author's website - Is this link dead or broken? -
Report it ( will open in new window )