Sandeep's Nook: JavaScript Page


Pop-ups Scripts


 1. AUTO CLOSING CUSTOMIZED POP-UP
   

This is a link that opens a small window, the size, features and content of which you can customize. This window will then close automatically at a given time that can be set. Additionally the window can be set to open at any specified place.

Click to open small window. Wait for 5 seconds to see what happens!

Click here for the script.
 
 2. ON THE BUTTON POP-UP
   

Below is a script with the help of which you can open a small pop-up window smack on the button that triggers the function. This prevents the window from popping off the edge of the screen as happens quite often in the case of pop-ups. This script works by capturing the mouse X and Y co-ordinates and so works accurately irrespective of the users resolution unlike if you were to just feed in fixed X and Y co-ordinates. It is compatible in Internet Explorer and Netscape 4+. Clicking the button below will help you understand how the script works.

     
Click here for the script.
 
 3. POP-UP CHECKBOX NAVIGATION MENU - I
   

Below is a script that opens a small pop-up window containing a unique checkbox navigation menu, smack on the button that triggers the function. This script works in the same way as the 'ON THE BUTTON POP-UP' script. Clicking the button below will help you understand how the script works. After the pop-up window opens you can choose to go to any of the given links. When any one checkbox is clicked the pop-up menu window automatically closes while a new window opens that takes you to the given URL. This script saves space as the button that opens the pop-up can be conveniently tucked away in a corner without the danger of the pop-up popping off the screen!

     
Click here for the script.
 
 4. POP-UP CHECKBOX NAVIGATION MENU - II
   

Similar to the POP-UP CHECKBOX NAVIGATION MENU - I, except that when any one checkbox is clicked the pop-up menu window automatically closes while the link opens in the window that triggered the popup and not a new window! No example has been provided for this script.

Click here for the script.
 
 5. ALWAYS ON TOP POP-UP
   

This is a link that opens a stubborn pop-up window. Stubborn because the window will refuse to be obscured by the main HTML file that opened it. It cannot even be minimised. Your viewers will be forced to view its contents and the only way to get rid of the window is to close it! This script could be used for making important announcements for your viewers.

Click to open the stubborn window!

Click here for the script.
 
 6. ALWAYS ON TOP FLOATING LAYER POP-UP* UPDATED *
   

This little script opens a floating layer pop-up. The advantage of this script is that viewers can work on the main window below the pop-up. In the previous "Always on Top Pop-up", viewers cannot activate the main window once the pop-up is opened. To activate the main window they will have to close or minimise the pop-up window. Additionally this layer will always hover at the spot it opens even if viewers were to scroll down the page. Also you can adjust where this layer will hover by modifying the script. Click the link below to see the script.

Click to view this script!
 
 7. AUTO HIDE POP-UP
   

This is a link that opens a pop-up window which automatically hides itself behind the main window after a given amount of time that can be set. This one line script prevents the pop-up from being too much of a nuisance and yet its contents can be viewed after the current browser session is over. Instead of the link as in the example, the pop-up can be made to open by itself. This can be done by adding the function to the HTML body tag as explained in the script that can be viewed by clicking the link below.

Click to open the auto-hide window!

Click here for the script.
 
 8. AUTO HIDE/SHOW POP-UP
   

This script like the previous one opens a pop-up that automatically hides itself behind the main window after a given amount of time that can be set. But in this script the difference is that the pop-up will again show itself after any amount of time that can be set. The novelty is that the pop-up can show itself in another location, i.e. at a different place than the one where it first popped up. It can thus hide and show itself any number of times as instructed in the script. In the example the pop-up opens at the top-left, then hides itself after 3 seconds and then pops-up at the bottom-left after another 3 seconds after which it closes itself after 2 seconds. Check it out by clicking the link below.

Click to open the auto hide/show window!

Click here for the script.
 
 9. HIDDEN POP-UP
   

This script opens up a pop-up that hides behind the main browser window. This script is useful as lately a lot of viewers are complaining about pop-ups that are becoming increasingly common and are considered as a nuisance. This way the contents of the pop-up can only be seen after the current browser session is over and so it would not be a distraction to viewers. For greater convenience, the pop-up in the example below opens after clicking the link. Usually such pop-ups are made to open by themselves without any link. After clicking the link you will have to minimize your browser window to view the pop-up!

Click to open the hidden window!

Click here for the script.
 
 10. SCROLLING POP-UP - I
   

Clicking the link below opens a pop-up window that automatically scrolls down from the top of the page to the bottom. This script can be used to jump from one photo or image to another till you reach the last item at the end of the pop-up whereupon the pop-up window automatically closes. The scrolling speed can be set to best suit your needs.

Click to open a window that illustrates one of the uses of this script.

Click here for the script.
 
 11. SCROLLING POP-UP - II
   

Like the previous one this script is of a pop-up that scrolls down. But unlike the previous script the scrolling process is smoother and even. This script is more suited for passages of lengthy text as illustrated in the example below. In the example the scrolling repeats itself after the end of the passage is reached. The script can be modified to instead close the window at the end of the passage. As in the above example the scrolling speed can be set to best suit your needs. The novelty of this script is that the scrolling can be temporarily stopped by clicking and pressing down the left mouse button. To resume just release the mouse button.

Click to open a scrolling pop-up.

Click here for the script.
 
 12. CENTERED POP-UP
   

This script opens a customized pop-up window exactly in the centre of the screen irrespective of the resolution of the viewers monitor. It is very useful as pop-ups do sometimes tend to open at random locations and sometimes even move off-screen.

Click to open a centered pop-up.

Click here for the script.
 
 13. MOVING POP-UP
   

This script opens a customized pop-up window that will move across the screen from top to bottom or left to right or diagonally across as instructed in the script. The movement as well as the time lapse can be controlled by modifying the script as instructed.

Click to open a moving pop-up.

Click here for the script.
 
 14. ONUNLOAD POP-UP
   

This script opens a pop-up window only after the main browser window is closed. This prevents the pop-up from being a nuisance while at the same time making sure that your viewers do not miss any important announcements or advertisements that you would like to put up on your web pages. No example has been provided for this script.

Click here for the script.
 
 15. RESIZEABLE POP-UP
   

This pop-up changes its size. In the example the pop-up expands to show additional content. The size of the pop-up, its contents, as well as the time-lapse can be changed as required. A simple yet quirky script.

Click to open an example of the resizer pop-up.

Click here for the script.
 
 16. ONCLICK CLOSE POP-UP
   

With the help of this script the popup window can be closed when the user clicks the mouse anywhere inside the popup. No example has been provided for this script.

Click here for the script.
 
 17. COOKIE ENABLED POP-UP
   

With this script the pop-ups will only open once per day or as desired by the users. This script will prevent the pop-ups from popping up every time your viewers move to the particular page that contains the script that opens the pop-up. This script can be used in conjunction with any of the pop-ups listed above. In the example provided I have put a button that will open the the pop-up instead of having the pop-up open by itself as is the norm. Note that the first time the button is clicked the pop-up opens but if you close the pop-up and try again it will not open. For the pop-up to open again you will have to advance your system clock by a day.

     
Click here for the script.
 
 18. DELAYED POP-UP
   

This script opens a pop-up window after a set amount of time that can be altered by the users to suit their needs. This pop-up would prove useful in attracting the attention of the visitors as it would pop-up when the visitors are busy perusing the page. Usually pop-ups open when the main page loads and so the visitors would immediately close it without reading its content. No example has been provided for this script.

Click here for the script.
 
 19. POP-UP THAT CLOSES WITH MAIN WINDOW
   

With this script the pop-up window if open would close by itself if the main window that triggered the pop-up closes or the visitor goes to another page. No example has been provided for this script.

Click here for the script.
 
 20. TIMED POP-UP
   

This script opens a pop-up window exactly at any given time (set in Hours, Minutes and whether AM/PM) the users can set. Visitors coming to view the page at any other hour would not get to see the pop-up. No example has been provided for this script.

Click here for the script.
 
 21. DATED POP-UP
   

This script opens a pop-up window only on any particular date (set as Date, Month and Year) the users can set. Visitors coming to view the page on any other date would not get to see the pop-up. No example has been provided for this script.

Click here for the script.
 
 22. MULTI DATED POP-UP
   

This script is similar to the one above. The difference being that users can have the popup open on multiple dates. No example has been provided for this script.

Click here for the script.
 
 23. DATED & TIMED POP-UP
   

This script would be useful for those users who wish to have a pop-up window open only on a particular date (set as Date, Month and Year) and time (set in Hours, Minutes and whether AM/PM) that can be set. Visitors coming to view the page on any other date/time would not get to see the pop-up. This script is a combination of the above two scripts. No example has been provided for this script.

Click here for the script.
 
 24. MULTI DATED & TIMED POP-UP - I
   

Similar to the one above. In this script though users can have the popup open on multiple dates. So instead of the popup opening on just a particular date and time, here the popup could be set to open on multiple dates at a given time. No example has been provided for this script.

Click here for the script.
 
 25. MULTI DATED & TIMED POP-UP - II
   

Similar to the one above. In this script users can have the popup open on multiple dates and also choose the hours between which the pop-up should open. So here the popup could be set to open on multiple dates and also between given hours that can be set. No example has been provided for this script.

Click here for the script.
 
 26. WEEKLY TIMED POP-UP
   

This pop-up window opens every week on the same day and at the same time (set in Hours, Minutes and whether AM/PM) that can be set. Visitors coming to view the page on any other day/time would not get to see the pop-up.

Click here for the script.
 
 27. ONMOUSEOVER POP-UP
   

This script opens a pop-up window when viewers hover their mouse over the link. Also this script can be used to open a popup when the mouse is taken over any text on the page and not necassarily a link as shown in the script. No example has been provided for this script.

Click here for the script.
 
 28. POP-UP CLOSER LINK
   

This is not strictly a pop-up script but a link to be added within a pop-up that when clicked closes the pop-up. No example has been provided for this script.

Click here for the script.
 
 29. ONMOUSEOVER CLOSE POP-UP
   

This script closes the popup window when the user moves the mouse anywhere over the popup. No example has been provided for this script.

Click here for the script.
 
 30. DROP DOWN MENU POP-UP OPENER
   

This script uses a drop down menu to open popup windows. No example has been provided for this script.

Click here for the script.
 
 31. REDIRECT ON POP-UP CLOSE
   

This script redirects users to any specified page whenever the popup the page opens is closed. This script was made after I noticed a few visitors coming to this site looking for a similar script.

Click here for the script.
 


Index Home Site Map Contact the author Back to top

Copyright © 2000 - 2024 Sandeep Gangadharan. All rights reserved.
Please read the Terms Of Use before using any of the scripts.