Javascript To Resize Window?

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

    Javascript To Resize Window?

    Is there any way to have a browser window resize itself when
    displaying a new HTML page? I'm using the javascript below to open a
    NEW window at a certain size, but I'd prefer the page to load in the
    same window, just sized differently. Here's the script I'm currently
    using:

    <a href="#" onClick="MyWind ow=window.open( 'THE_DOC.html', 'MyWindow','too lbar=no,locatio n=no,directorie s=no,status=yes ,menubar=no,scr ollbars=yes,res izable=yes,widt h=575,height=80 5,left=20,top=2 0');
    return false;">

    Any input appreciated.
  • DU

    #2
    Re: Javascript To Resize Window?

    Fleemo wrote:[color=blue]
    > Is there any way to have a browser window resize itself when
    > displaying a new HTML page?[/color]

    Not anymore because many browsers now have user setting prefs that can
    disallow scripters from doing that for secondary windows. For windows
    not opened by javascript, you need enhanced security privileges.

    I'm using the javascript below to open a[color=blue]
    > NEW window at a certain size, but I'd prefer the page to load in the
    > same window, just sized differently.[/color]

    No you can not do that without enhanced security privileges.

    Here's the script I'm currently[color=blue]
    > using:
    >
    > <a href="#" onClick="MyWind ow=window.open( 'THE_DOC.html', 'MyWindow','too lbar=no,locatio n=no,directorie s=no,status=yes ,menubar=no,scr ollbars=yes,res izable=yes,widt h=575,height=80 5,left=20,top=2 0');
    > return false;">
    >[/color]

    The requested window dimensions plus window toolbars and os-dependent
    semi-permanent applications like windows taskbar will exceed the height
    of the available workspace for application so the popup will never have
    the requested height in a majority of cases (for users with 800x600 and
    1024x768 scr. res.)
    [color=blue]
    > Any input appreciated.[/color]


    DU
    --
    Javascript and Browser bugs:

    - Resources, help and tips for Netscape 7.x users and Composer
    - Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x


    Comment

    • Fleemo

      #3
      Re: Javascript To Resize Window?

      Well, that's disappointing. All the same, thanks for the input.

      -F

      Comment

      Working...