facebook  linkedin  Twitter  skype  Rss googlePlus

Adding Popup Windows

Dec 05 1999

 I find it handy to open small content in a window. If I just have a small help file or something that really doesn't deserve a whole window I just create a link on my page that opens a small window with the page loaded in it. It's really very simple, but since I can never seem to find the script that works in both IE and Netscape I decided to post it here on Santry.com for easy reference. The first thing is to add a link on a page that points nowhere and then add the Javascript onclick event to the href tag that will then open a new window.

<a href="#" onclick="window.open('http://www.santry.com/help.htm', 'newWin','toolbar=no,location=no left=40 hight=100,scrollbars=yes,width=350,height=500');">click here</a><br />

click here

You can see when a user clicks on the hyperlink it will call the window.open procedure. In this procedure you can pass a variety of properties in order to display your window. First, is mandatory and that the url that you want to load. Then there is the name of the window, this is used when refering to the window again via scripting. The last property here is a string that defines the appearance of the new window, you can pass the size, position, features and other criteria here.  

About the Author, Patrick Santry

Patrick Santry, has two decades of experience in enabling businesses to take advantage of the digital landscape. A well rounded experience in technology, and business is what sets me apart from the rest of the pack. When it comes to an overall digital strategy my experience is impressive.

BS in Computer Information Systems. Four time recipient of the Microsoft MVP Award, and author of several books and magazine articles on digital technologies.

blog comments powered by Disqus


Thank you for visiting our site, before you leave, please visit some of the areas or information you may have missed.

Popular Articles