(Site Identification)

'Eye' Focus: Web Support Tutorials

JavaScript: Linker for Pop-Up Browser Windows

Here is a SAFE way to do Pop-Up Browser Windows. If the browser does not support JavaScript a standard web link is provided instead of the JavaScript link. This is better than assuming that the visitor's browser supports the script. This script also centers the pop-up window in the visitor's screen for better attention.


An easy way to see how this works without JavaScript is with a Netscape Browser. Simply go into your Netscape preferences and turn off JavaScript support. Then reload the web page and try the link again. Instead of getting a pop-up window the visitor will simply be sent to the web page.

PS: The source code pop-up window has an additional JavaScript that it uses. The 'Previous Page' button you see on the pop-up is actually an image and another variation on this method. However, the purpose for the JavaScript there is to: close the window if JavaScript was supported, or link back to this page if JavaScript was not supported.


[Updated: Sunday, November 18, 2007]