Mozilla v IE window.open

Discussion in 'Javascript' started by DaveG, Mar 17, 2006.

  1. DaveG

    DaveG Guest

    Hi All

    I am having a small problem with window.open() obviously something I am
    or am not doing.

    This is being fired from a subwindow. Everytime I use just the
    location.href = "URL" I got a new window the same size as the subwindow
    it was launched from.

    The code below works in Mozilla by IE still opens a window the same
    size as the subwindow

    x = screen.width;
    y = screen.height;

    extWindow = window.open("http://www.stevengould.org/software/cleanup/",
    "ext", "toolbar=no, resizable=yes");
    extWindow.resizeTo(x, y);
    extWindow.moveTo(0, 0);

    All ideas will be helpfull

    Thanks in advance
    --
    DaveG
    Skøyen - Oslo - Norway
    DaveG, Mar 17, 2006
    #1
    1. Advertising

  2. DaveG wrote :
    > Hi All
    >
    > I am having a small problem with window.open() obviously something I am
    > or am not doing.
    >
    > This is being fired from a subwindow. Everytime I use just the
    > location.href = "URL" I got a new window the same size as the subwindow
    > it was launched from.
    >
    > The code below works in Mozilla by IE still opens a window the same
    > size as the subwindow


    You have not provided an url nor a lot of code regarding your problem.

    >
    > x = screen.width;
    > y = screen.height;


    Your calculation here is irrelevant as most Windows users have the
    Windows taskbar present and sometimes other semi-permanent applications
    (eg Office Quicklaunch bar). The work area for applications is what
    matters here, not the entire screen area.

    >
    > extWindow = window.open("http://www.stevengould.org/software/cleanup/",
    > "ext", "toolbar=no, resizable=yes");


    The way you coded this, your code will request to remove the navigation
    toolbar and everything else removed: because the "If you define the
    strWindowFeatures parameter, then the features that are not listed,
    requested in the string will be disabled or removed"
    http://developer.mozilla.org/en/docs/DOM:window.open#Examples
    As soon as there is a blank space, feature parsing/detection is stopped.
    So, the window will not be resizable because there is a blank space in
    the windowFeatures string list.
    "string parameter must not contain any blank space. Each requested
    window feature must be separated by a comma inside the character string".
    http://developer.mozilla.org/en/docs/DOM:window.open#Return_value_and_parameters

    "if no size features are defined, then the new window dimensions will be
    the same as the dimensions of the most recently rendered window."
    http://developer.mozilla.org/en/docs/DOM:window.open#Examples

    which is exactly the case here. This is by design too from browser
    manufacturers.
    The os must have the time to save those position and size data (re:
    userdata persistence).

    > extWindow.resizeTo(x, y);
    > extWindow.moveTo(0, 0);
    >


    Resizing and moving existing windows is usually turn off by users. If
    you get the size+position results you were expecting in Mozilla, it is
    only because your advanced setting allow resizing and moving of existing
    windows. You can expect MSIE 7 final release to follow Mozilla, Opera,
    Safari on this.

    Gérard
    --
    remove blah to email me
    Gérard Talbot, Mar 17, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lord of Chaos
    Replies:
    0
    Views:
    441
    Lord of Chaos
    Jan 11, 2010
  2. Denis McMahon

    mozilla window.open in new tab

    Denis McMahon, Feb 23, 2004, in forum: Javascript
    Replies:
    1
    Views:
    111
    Martin Honnen
    Feb 23, 2004
  3. PC HUA
    Replies:
    2
    Views:
    394
    PC HUA
    May 19, 2004
  4. kaith

    window.open does not work in mozilla

    kaith, Jun 11, 2004, in forum: Javascript
    Replies:
    3
    Views:
    93
    Thomas 'PointedEars' Lahn
    Jun 20, 2004
  5. geefypants
    Replies:
    0
    Views:
    143
    geefypants
    Oct 28, 2004
Loading...

Share This Page