Opens a new Web browser window.
JSV_openWindow(winName [, winURL, winAttributes, winReplace, winOptions...])
JSV_openWindow(winName, winURL) (see Remarks)
JSV_openWindow(winName) (see Remarks)
Returns true if the window is opened, or false if no window name was passed.
The openWindow function uses the following arguments.
Argument | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
winName |
This is the target name of the new window.
A string specifying the window name to use in the TARGET attribute of a
FORM or A tag. winName can contain only
alphanumeric or underscore (_) characters.
Used to load another document into the window with JSV_openWindow
or manipulate the document/window with other JavaScript Vision
window management functions.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
winURL |
Optional. A string specifying the relative or absolute URL of the file to be
loaded into the pop-up window. See the
Location
object for a description of the URL components.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
winAttributes |
Optional. A string containing a comma-separated list determining whether or not to create various standard window features. This parameter can hold a large selection of name-value pairs:
If you don't specify the width or height values, then Netscape browsers will mimic the size of the current window, if you don't specify any attributes then Netscape will mimic all the features of the current window. Both Nav4 and IE4 introduced new window features that can be set when opening up a new window:
Many of these features (as noted above) can either be yes or no. For these
features, you can use 1 instead of yes and 0 instead of no. If you want to turn a
feature on, you can also simply list the feature name in the
If |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
winReplace | Optional. The fourth parameter is a Boolean value, either true (set this to true only if using Navigator 3+ or Internet Explorer 4+) or false. If true, then the current history entry is replaced with the new page being loaded (i.e., the last location in the browser's history object is overwritten by the new location). Default value is false. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
winOptions |
Optional. Currently only one value can be specified.
|
Similar to the
open
method of
window
but used within the context of JavaScript Vision window management
(i.e., the windows are managed using the window name versus the window handle).
JSV_openWindow(winName, winURL)
Use this format of JSV_openWindow
, after the window has been defined using
JSV_openWindow
or JSV_defineWindow
, to open the named window
with a different URL than the window was originally defined with.
var myWindow = "JSV_Test";
var wasOpened =
JSV_defineWindow(myWindow,
'http://www.infoseek.com/',
'status=1,scrollbars=1,resizable=1,width=580,height=240,left=40,top=40,screenX=40,screenY=40');
var wasOpened = JSV_openWindow(myWindow, 'http://www.builder.com/');
JSV_openWindow(winName)
Use this format of JSV_openWindow
, after the window has been defined using
JSV_openWindow
or JSV_defineWindow
, to open the named window
with the URL that was used when the window was originally defined.
var myWindow = "JSV_Test";
var wasOpened =
JSV_defineWindow(myWindow,
'http://www.infoseek.com/',
'status=1,scrollbars=1,resizable=1,width=580,height=240,left=40,top=40,screenX=40,screenY=40');
var wasOpened = JSV_openWindow(myWindow);
If the window has not been defined with
JSV_defineWindow
,
then JSV_openWindow
defines the window and makes the new window available to other JavaScript Vision
window management functions.
The following lines of code
function windowTest() {
var myWindow = "JSV_Test";
var wasOpened =
JSV_openWindow(myWindow,
'testpage.htm',
'status=1,scrollbars=1,resizable=1,width=580,height=240,left=40,top=40,screenX=40,screenY=40');
}
produce a new window when the button is clicked
Copyright © 1999-2000 Roaring Fork Software. All rights reserved.