See also: JSV_windowCenter, JSV_getWindowDimensions, JSV_xyValues

Determines the difference between the inner browser window dimensions and the known outer dimensions of the browser window.

Syntax

JSV_getWindowDeltas(expX, expY | expXY, expWH)

Returns

Returns an x,y object (see JSV_xyValues) containing the difference between the inner window dimensions and the outer dimensions of the browser window.

Parameters

The JSV_getWindowDeltas function uses the following arguments.

Argument Description
expXY The x,y object (see JSV_xyValues) that contains the width and height, respectively, of the window to be centered.
expX, expY The width (expX) and height (expY) of the window to be centered.
expWH The window handle—the result of the open() method that is a reference or handle to the newly opened window and used to close the window, and to interrogate and alter the windows properties.

Remarks

This function is for use with browsers that support JavaScript 1.2 or later.

The best time to use this function is right after you create a new browser window (e.g., when using JSV_popWindow, JSV_openWindow, or the open method of window).

For more information on the use of JSV_getWindowDeltas, see JavaScript Vision Frequently Asked Questions.

Dependencies

n/a

Example

The following lines of code

var myWindowHandle = null;
var myWindow = "JSV_Test";
var myAttributes =  'status=1,scrollbars=1,resizable=1,' +
                    'width=580,height=240,' +
                    'left=40,top=40,screenX=40,screenY=40';

var myXY = new JSV_xyValues(580,240);
var jsvWindowDeltas = new JSV_xyValues();

function windowTest() {
    myWindowHandle = JSV_popWindow( myWindowHandle, 
                                    myWindow, 
                                    'JSV_TestWindow.html', 
                                    myAttributes, 
                                    false);
    jsvWindowDeltas = JSV_getWindowDeltas(myXY, myWindowHandle);
    alert("x delta = " + jsvWindowDeltas.x + "\n" + "y delta = " + jsvWindowDeltas.y);
    myWindowHandle.focus();
}

produce