Use this JavaScript to keep a window ‘on top’ of the rest of your other windows. Not sure what I mean? Try it out and see!
- Paste the coding into the HEAD of your “opener” HTML document
- Copy the second coding into the BODY of your “opener” page
- Create your pop-up page and save it as popup-page.html
- Put the onBlur handler in the BODY of popup-page.html
<!– STEP ONE: Copy this code into the HEAD of your “opener” page –>
<HEAD>
<SCRIPT LANGUAGE=”JavaScript”>
<!– This script and many more are available free online at –>
<!– The JavaScript Source!! http://javascriptsource.com –>
<!– Begin
function topWindow(){
popup = window.open(“popup-page.html”,””,”height=175,width=300,scrollbars=no”);
}
// End –>
</SCRIPT>
<!– STEP TWO: Add this code the the BODY of your “opener” page –>
<BODY>
<CENTER>
<FORM>
<INPUT TYPE=”BUTTON” VALUE=”Pop-Up” onClick=”topWindow()”>
</FORM>
</CENTER>
<p><center>
<font face=”arial, helvetica” size=”-2″>Free JavaScripts provided<br>
by <a href=”https://javascriptsource.com”>The JavaScript Source</a></font>
</center><p>
<!– STEP FOUR: Add onBlur handler to BODY of popup-page.html –>
<BODY onBlur=”self.focus()”>
<p><center>
<font face=”arial, helvetica” size=”-2″>Free JavaScripts provided<br>
by <a href=”https://javascriptsource.com”>The JavaScript Source</a></font>
</center><p>