Results 1 to 3 of 3

Thread: Specify Popup LEFT And TOP window Position

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2004
    Location
    malaysia
    Posts
    57

    Specify Popup LEFT And TOP window Position

    <SCRIPT language="JavaScript">
    <!-- Hide the script from old browsers --
    function surfto(form) {
    var myindex=form.dest.selectedIndex
    window.open(form.dest.options[myindex].value,"main","height=500,width=500,location=no," + "scrollbars=no,menubars=no,toolbars=no,resizable=yes");
    }
    //-->
    </SCRIPT>

    this is my coding for drop down popup menu...
    it only specify the width and the height of my popup window!

    ANYONE CAN HELP ME ADD EXTRA LINE INSIDE THE CODE TO SPECIFY THE LEFT AND TOP OF THE POPUP PAGE?
    IT LOOKS SOMETHING LIKE THIS...

    ",left=" + l + ",top=" + t + "

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    You should move the window using moveTo

    Untested but it should work:
    Code:
    <SCRIPT language="JavaScript">
    <!-- Hide the script from old browsers --
    function surfto(form) {
    var myindex=form.dest.selectedIndex
    myWin = window.open(form.dest.options[myindex].value,"main","height=500,width=500,location=no," + "scrollbars=no,menubars=no,toolbars=no,resizable=yes");
    }
    myWin.moveTo(x, y)
    //-->
    </SCRIPT>
    Replace the x and y with the coordinates you want your window at.
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2004
    Location
    malaysia
    Posts
    57
    WELL...LET ME TRY THAT FIRST! THANX...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width