JAVASCRIPT
POPUP WINDOWS 1

[Requires a browser that supports JavaScript.]

§1 Open a new browser window.


<html>
<head>
<title>Popup Windows 1
</title>
</head>
<body>

<a href="#" onclick="window.open('testpage.html','popone')">popup window</a>   

</body>
</html>

Click the link in the right frame. When you're finished close the new popup window.

Notes

The new browser window is the same size as the original. If the original was not maximized, the new one is positioned slightly to the right and down from the original.

Note the use of quotation marks. The outermost set should be double quotation marks.

The first argument is the URL of the file to be loaded into the new browser window.

The second argument is the name of the window. You use this name with a target attribute.

To control the appearance of the window you use the optional feature list discussed in the next topic.


Copyright © 2000 P.J. LaBrocca. http://LaBrocca.com