Java Reference
In-Depth Information
Features such as menu bar, status bar, and toolbar can be switched on or off with yes or 1 for on and no
or 0 for off. You can also switch these features on by including their names without specifying a value.
The list of possible options shown in the following table is not complete, and not all of them work with
both IE and Firefox browsers.
Window Feature
Possible Values
Description
copyHistory
yes , no
Copy the history of the window doing the opening to
the new window
directories
yes , no
Show directory buttons
height
integer
Height of new window in pixels
left
integer
Window's offset from left of screen.
location
yes, no
Show location text fi eld
menubar
yes, no
Show menu bar
resizable
yes, no
Enable the user to resize the window after it has been
opened
scrollbars
yes , no
Show scrollbars if the page is too large to fi t in the
window
status
yes , no
Show status bar
toolbar
yes , no
Show toolbar
top
integer
Window's offset from top of screen.
width
integer
Width of new window in pixels
As mentioned earlier, this third parameter is optional. If you don't include it, then all of the window
features default to yes, except the window's size and position properties, which default to preset val-
ues. For example, if you try the following code, you'll see a window something like the one shown in
Figure 8-10:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<script type=”text/javascript”>
var newWindow;
newWindow = window.open(“”,”myWindow”);
</script>
</head>
<body>
</body>
</html>
Search WWH ::




Custom Search