#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Posts
    6
    Rep Power
    0

    Unhappy javascript popup window positions


    Hi,

    I've been looking through these forums for a way to position a popup a little bit OFF the page.

    Here is the script I have now:
    function openit()
    {
    newWindow = window.open('buy10.html', 'myWindow','width=720,height=300,top=-20,left=0');
    }

    I was attempting to position a popup window so that the very top part of the window would be out of reach of the cursor. If that couldn't work, I was thinking to position the the right side close button/vertical scroll bar section to the right of the screen.

    Can anyone help?
    Most appreciated.

    Owen

    Oh yeah, additionally, after my popup comes up (it turns on when someon either refreshes, moves to a new url, or closes the main window), I want it to show up on the bottom side if the main window is still open. How do I manage to do that? Add a refresh script after the popup script in the page? Can someone show me the code for doing this? More or less, I'm trying to create a "pop under".
    Last edited by owen; October 31st, 2001 at 12:39 PM.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    70
    Rep Power
    14
    You could use the window.moveBy(x,y) method to move it where you want.

    Place it in the onLoad handler.

    <BODY onload="javascript:window.moveBy(5, 5);">
    Jan.

    N24 - ALL the newspapers on ONE site.
    JMailbox - Free Web Based Email Client.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Posts
    6
    Rep Power
    0

    Thanks


    Thanks for your time. I appreciate your help. I had gotten it to work, however my boss found the code to make it pop under so that was the preferred event.

    Oh well. In case anyone's interested, here is the code that was sent to me:

    <!-- POPUNDER BEGINS -->
    <script language="JavaScript">
    <!--
    function popunder()
    {
    pu = window.open("xxx.html", ´myWindow´,´width=720,height=300,left=150,top=150´);
    pu.blur();
    window.focus();
    }
    //-->
    </script>

    </head>

    <body bgcolor="#FFFFFF" onLoad="javascriptopunder()">

IMN logo majestic logo threadwatch logo seochat tools logo