Window Management
The window is an object, just like any other. Simply
a collection of properties, methods and events. Since
this is true, we can treat it just like any other object, including
saving it in a variable. This gives us control of a new
window after it has been loaded.
In the following example, we open a new window using the
"window.open( )" method. We define the size and specifications
for the window and then save it in a variable. This gives
us access to the new window's document and therefore everything
on that document.
var strFeatures = "top=150, left=250,
height=300, width=300,"+ "toolbar=no,
status=no, scrollbars=yes, menubar=no"
var OpenWindow=window.open
("","_blank",strFeatures);
We can access the properties of this new window by using
the variable "OpenWindow".
OpenWindow.close();
|