window position with window.open

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • F@bio

    window position with window.open

    I'm trying to open a window in a specific position of the screen with this
    script:

    window.open('wi ndow.htm','mywi ndow','width=25 0,height=350,sc reenX=20,screen Y
    =100')

    it works with Netscape 6.2 but Internet Explorer and Opera just seem to
    ignore the XY coordinates.

    Any idea on how to make it work?

    Thanks!

    F@bio


  • Grant Wagner

    #2
    Re: window position with window.open

    "F@bio" wrote:
    [color=blue]
    > I'm trying to open a window in a specific position of the screen with this
    > script:
    >
    > window.open('wi ndow.htm','mywi ndow','width=25 0,height=350,sc reenX=20,screen Y
    > =100')
    >
    > it works with Netscape 6.2 but Internet Explorer and Opera just seem to
    > ignore the XY coordinates.
    >
    > Any idea on how to make it work?
    >
    > Thanks!
    >
    > F@bio[/color]

    Internet Explorer and Opera use "top" and "left" attributes instead of "screenY"
    and "screenX". So for maximum browser compatibility, include them all:

    window.open('wi ndow.htm','mywi ndow','width=25 0,height=350,sc reenX=20,screen Y=100,left=20,t op=100');

    More details at: <url:
    http://msdn.microsoft.com/workshop/a...ods/open_0.asp />

    I'd also strongly suggest you upgrade to Netscape 7.11, Netscape 6.2 has a
    number of bugs which could make it appear that currently valid JavaScript isn't
    working right.

    --
    | Grant Wagner <gwagner@agrico reunited.com>

    * Client-side Javascript and Netscape 4 DOM Reference available at:
    *


    * Internet Explorer DOM Reference available at:
    *
    Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.


    * Netscape 6/7 DOM Reference available at:
    * http://www.mozilla.org/docs/dom/domref/
    * Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
    * http://www.mozilla.org/docs/web-deve...upgrade_2.html


    Comment

    Working...