Closes all defined windows if the window is open (including the show window definition window). The JSV_onUnload function is used in the onUnload attribute of the <BODY> tag.

Syntax

JSV_onUnload()

Returns

n/a

Parameters

n/a

Remarks

To use the JSV_onUnload function in a window, add this function to the <BODY> tag (e.g., <BODY onUnload="JSV_onUnload();">). If you find it necessary to create a function that will do perform other functionality when onUnload is activated, be sure to include the JSV_onUnload function as the last call in your new function.

<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
function webPageOnUnload() {

    // Your code goes here

    JSV_onUnload();
}
</SCRIPT>

<BODY onUnload="webPageOnUnload();">

Dependencies

n/a

Example

The following lines of code

function openMyWindows() {
    var myWindow = "Flash_Gordon";
    var wasOpened = JSV_openWindow(myWindow, 'testpage2.htm', 'status=1,scrollbars=1,resizable=1,width=580,height=240,left=20,top=20,screenX=20,screenY=20');
    var myWindow = "Captain_Zoom";
    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 two windows when the button is clicked that will then close when this page is exited