Sandeep's Nook: JavaScript Page

Always on Top Floating Layer Pop-up

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. Such pop-ups usually would be activated automatically when the main page opens but in the example a button is provided that opens the pop-up. To see an example of the pop-up just click the button below:


Author: Sandeep Gangadharan
Home Page: http://sivamdesign.com/home/


The script is given below:

This goes in the HEAD of the html file:

Note the script in the BODY tag:

<body onLoad="placeIt()">

If users want the popup to open on the page loading, add the following code to the BODY tag:

<body onLoad="placeIt(); showIt()">

If not, they can keep the button as shown in the code below.

This goes in the BODY of the html file:
Change the value of 'left' in the layers properties below to adjuct the X co-ordinate