IE7 RC1 problem positioning pop-ups in pop-ups

Discussion in 'Internet Explorer' started by Casper van Dijk, Sep 26, 2006.

  1. Can anyone tell me if the following behavior is by design or an IE7RC1 bug:

    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>
     
    Casper van Dijk, Sep 26, 2006
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.