If I call window.createPopup() where 'window' is in itself a popup window,
the position of the second popup is limited - it appears that it should at
least overlap 50% with the first popup.
I use this mechanism in IE6 to create context menu rollover.. Any insight is much appreciated..
Casper
-- to try this out, run this HTML in IE7RC1, click on tag, click on green --
<HTML>
<HEAD>
<TITLE>Nested popup windows</TITLE>
<script>
var firstPopupDiv = null;
function tag_onclick()
{
var popup = window.createPopup();
var div = popup.document.createElement("DIV");
div.style.backgroundColor = "green";
div.style.width = 200;
div.style.height = 200;
div.onclick = div_onclick;
popup.document.body.appendChild(div);
firstPopupDiv = div;
popup.show(30, 30, 200, 200, maindiv);
}
function div_onclick()
{
var popup =
firstPopupDiv.ownerDocument.parentWindow.createPopup();
popup.document.body.style.backgroundColor = "red";
popup.show(230, 30, 200, 200, firstPopupDiv); // Not
shown at 230!
}
</script>
</HEAD>
<BODY>
<div id="maindiv" onclick="tag_onclick()">Click me</div>
</BODY>
</HTML>