Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Auto Resize

  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Auto Resize

    Is it possible to make it so that when you open a page, it will automatically resize itself to specied height and width?

    I tried
    function openWindow(){
    window.close();
    window.open(URL,"","width=300 height=600");
    }
    <body onLoad="openWindow()">

    but for some reason, when i visit the page, it asks me if its ok to rezise the window. I really need to avoid that if possible.

    Thanks.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Montreal, Canada
    Posts
    644
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What's with the close?

    <script>
    function openWindow(URL){
    pop=window.open(URL,"","width=300 height=600");
    }
    </script>

    </head>

    <body onLoad="openWindow('http://www.google.com')">

    You can also change it once loaded:

    from popupsite:

    window.resizeTo(300,600)

    or from the first page:

    pop.window.resizeTo(300,600)

  • #3
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hmm.. let me describe this better..... im trying to replace the window. So essentially what i want done is this.... The window to open, read my script, and finally resize itself WITHOUT scroll bars to the height and width i told it to. Can anyone help me??
    Last edited by Merlin; 08-22-2002 at 02:30 AM.


  •  

    Posting Permissions

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