Methods


show Method

Displays a pop-up window on the screen.

Syntax

object.show(iX, iY, iWidth, iHeight [, oElement])

Parameters

iX Required. Integer that specifies the x-coordinate of the pop-up window, in pixels.
iY Required. Integer that specifies the y-coordinate of the pop-up window, in pixels.
iWidth Required. Integer that specifies the width of the pop-up window, in pixels.
iHeight Required. Integer that specifies the height of the pop-up window, in pixels.
oElement Optional. Object that specifies the element to which the x andy coordinates are relative. If none is given, the x and y coordinates are relative to the desktop, where (0,0) is the upper left corner.

Return Value

No return value.

Remarks

A popup object is set to the same zoom level as the parent window.

 New for Windows Internet Explorer 8 Internet Explorer 8. Pop-up windows zoom by default; this behavior cannot be changed. This only applies to pop-up windows created with createPopup.

Example

The following example shows how to use the show method to create and display a pop-up window.

<html>
<head>
<SCRIPT LANGUAGE="JScript">
var oPopup = window.createPopup();
function window_onload() {
    var oPopupBody = oPopup.document.body;
	oPopupBody.style.backgroundColor = "lightyellow";
	oPopupBody.style.border = "solid black 1px";    
    oPopupBody.innerHTML = "Display some <B>HTML</B> here.";
    oPopup.show(100, 100, 200, 50, document.body);}
</SCRIPT>
</head>
<body onload="window_onload();">
</body>
</html> 

Standards Information

There is no public standard that applies to this method.

Applies To

popup, HTMLPopup Constructor

See Also

Tags :


Page view tracker