<< .. Go to : Exercise 9 : Demo 9 : Rollovers : PopUp Window : DropDown Menu : Slideshow1 : Slideshow2 : All Class Demos .. >>

Popup Window

Try these links and see what happens:
click me for one
click me for two
click me for three

This code will open up a new popup window. You can specify exactly where, how big, plus you can control the
other attributes in this script, such as whether or not there is a toolbar or status bar in the window, by setting
them to 1 (or yes) or 0 (or no). Change the size and location of the window by changing the code in red.

To install this script, follow these simple steps:

1. Copy and paste this script into the HEAD of your document:


<script type="text/JavaScript">

function new_window(url) {

link = window.open(url,"LinkName","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=200,height=250,left=80,top=180");

}

</script>

2. Copy and paste this into the BODY of your document:

Change the name in red to the name of the document you want to open in the popup window:

<a href="javascript:new_window('your_popup.html')">click me</a>