Creates a popup window.
Syntax
oPopup = window.createPopup( [vArgs])
Parameters
vArgs |
Optional.
This argument is reserved.
|
Return Value
Returns the popup window object.
Remarks
The pop-up window is initially in a hidden state.
When an element has focus and causes a popup to appear, the element does not lose focus. Because of this, an onblur event associated with an element that creates a popup will not occur when the popup is displayed.
Microsoft Internet Explorer 6 for Microsoft Windows XP Service Pack 2 (SP2) places several restrictions on windows created with this method. Restricted properties include size, screen position, and z-order. For more information, see About Window Restrictions.
Note Pages that change the
document.domain property before creating the popup object may receive an 'Access is denied' error message when accessing the popup object. Changes made to
document.domain in the calling page will not propogate to the new popup object; this is currently a design restriction to limit access with the popup object.
Example
The following example shows how to use the createPopup method to create and display a pop-up window.
<HTML>
<HEAD>
<TITLE>Popup Example</TITLE>
<SCRIPT LANGUAGE="JScript">
var oPopup = window.createPopup();
function ButtonClick()
{
var oPopBody = oPopup.document.body;
oPopBody.style.backgroundColor = "lightyellow";
oPopBody.style.border = "solid black 1px";
oPopBody.innerHTML = "Click outside <B>popup</B> to close.";
oPopup.show(100, 100, 180, 25, document.body);
}
</SCRIPT>
</HEAD>
<BODY>
<BUTTON >Click Me!</BUTTON>
</BODY>
</HTML>
Standards Information
There is no public standard that applies to this method.
Applies To
See Also
Using the Popup Object, document, show, hide, isOpen