maximizing window with xml file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marina Ferguson

    maximizing window with xml file

    Hi,

    I have a function that I use to open a window and maximize it:

    function funOpenWin(strP ath) //strPath contains path to the file to load
    {
    var objHelpWin;
    objHelpWin = window.open( strPath, "_blank", "menubar=no ,
    scrollbars=yes, status=yes");
    objHelpWin.move To(0,0);

    objHelpWin.resi zeTo(objHelpWin .screen.availWi dth,objHelpWin. screen.availHei g
    ht);
    }

    If I pass it a file with an .html extension, it works just fine. But if I
    pass it a file with an .xml extension, it gives me an error on the last
    line. The window still opens and displays just fine, but it's not
    maximized.

    Any help would be appreciated.




  • DU

    #2
    Re: maximizing window with xml file

    Marina Ferguson wrote:
    [color=blue]
    > Hi,
    >
    > I have a function that I use to open a window and maximize it:
    >
    > function funOpenWin(strP ath) //strPath contains path to the file to load
    > {
    > var objHelpWin;
    > objHelpWin = window.open( strPath, "_blank", "menubar=no ,
    > scrollbars=yes, status=yes");[/color]

    Your window.open call as written will have no scrollbars (if they are
    needed, that is if content overflows window dimensions) and will not
    have a status bar simply because there are blank spaces in your 3rd
    parameter. That is unless the user has customized his browser to impose
    to render scrollbars (if needed) and to impose presence of a statusbar
    via hidden prefs.
    [color=blue]
    > objHelpWin.move To(0,0);
    >
    > objHelpWin.resi zeTo(objHelpWin .screen.availWi dth,objHelpWin. screen.availHei g
    > ht);[/color]

    I would not use moveTo and resizeTo methods for several reasons. One of
    them is that many users can now neutralize calls to these methods (via
    UI prefs, hidden prefs or browser add-ons). Another one is that there
    are bugs related to the memory management (asynchronuous) of window
    object reference (your objHelpWin) in several browsers. Another one is
    that setting left, top, width and height in the window.open call is more
    reliable and less cpu and RAM demanding. Finally the most important
    reason is that trying to maximize a requested popup is going to cause
    usability difficulties (which I will not explicit here) for many users
    or it will annoy users with large screen and/or multiple screens.
    [color=blue]
    > }
    >
    > If I pass it a file with an .html extension, it works just fine. But if I
    > pass it a file with an .xml extension, it gives me an error on the last
    > line. The window still opens and displays just fine, but it's not
    > maximized.
    >
    > Any help would be appreciated.
    >
    >[/color]


    For many reasons, what you are trying to do is not recommendable.

    DU

    Comment

    Working...