+ Reply to Thread
Results 1 to 11 of 11

Thread: browser window resize onload

  1. #1
    Full Member mdbriggs is on a distinguished road
    Join Date
    Jan 2004
    Location
    Lexington, KY
    Posts
    17

    browser window resize onload

    i had forgotten how to do this. some might find it useful.

    <script language="javascript">
    window.resizeTo(600,800);
    </script>

    to make you window open at 600 by 800

    also question for anyone whos into this stuff. whats the code to make the browser not have any menu bar or navibar and none of that other good stuff.
    mdbriggs - http://mdbriggs.com
    "I can't understand why people are frightened of new ideas. I'm frightened of the old ones." - John Cage

  2. #2
    Full Member Marshall is on a distinguished road
    Join Date
    May 2004
    Posts
    69
    Use this

    toolbar=0,scrollbars=0,location=0,statusbar=0,menu bar=0,resizable=0,width=1024,height=768 to make it a popup with no bars at all, you have to use it in a window open command though

  3. #3
    Full Member mdbriggs is on a distinguished road
    Join Date
    Jan 2004
    Location
    Lexington, KY
    Posts
    17

    yeah

    yeah i used that in the past, but i'm looking for more of a on page load more than the whole "popup" thing.
    mdbriggs - http://mdbriggs.com
    "I can't understand why people are frightened of new ideas. I'm frightened of the old ones." - John Cage

  4. #4
    Full Member wicked_gal00 is on a distinguished road
    Join Date
    May 2004
    Location
    Canada
    Posts
    56
    I'm not sure you can do that unless you pop up a new window. If you can, I'd also be interested in this code.

  5. #5
    Full Member mdbriggs is on a distinguished road
    Join Date
    Jan 2004
    Location
    Lexington, KY
    Posts
    17

    im pretty sure

    im pretty sure that there is a way to do it; though i could be halucinating. I thought i remembered using it in some site i was working on, but just in the testing phase. the code never made it onto whatever site i was working on. so many late nites( or early mornings) coding i could have been dreaming, heh. i continue my search for what could be nonexistant.
    mdbriggs - http://mdbriggs.com
    "I can't understand why people are frightened of new ideas. I'm frightened of the old ones." - John Cage

  6. #6
    Active Member WorldBuilder is on a distinguished road
    Join Date
    Jan 2004
    Location
    Boston, MA
    Posts
    366
    What do you mean? As soon as they enter your site the toolbars and such disappear?...

    You can't mess with the browser window if you didn't create it, so theoretically it can't be done...

    A cunning workaround (which probably only really works well in IE) is to load a popup the size you want it to be, and close the main window immediately upon entering your site...

    To do this, try using this as your index.html page...
    Code:
    <html>
    <head>
    <script type="text/JavaScript">
    <!--
    function resize()
    {
       var daWin=window.open("mainPage.html","Window","width=500,height=500");
       window.opener=null;
       window.close();
    }
    -->
    </script>
    </head>
    
    <body onLoad="resize();">
    ...
    </body>
    </html>
    Try that...

    Chris
    My Site | My Blog
    "The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing."
    "Insanity is doing the same thing over and over again, expecting different results"
    --Albert Einstein

  7. #7
    Full Member wicked_gal00 is on a distinguished road
    Join Date
    May 2004
    Location
    Canada
    Posts
    56
    Oh, that's a neat way of doing it. Wouldn't have thought of that. I may use that someday, too. Thanks.

  8. #8
    Active Member WorldBuilder is on a distinguished road
    Join Date
    Jan 2004
    Location
    Boston, MA
    Posts
    366
    Anytime.

    Chris
    My Site | My Blog
    "The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing."
    "Insanity is doing the same thing over and over again, expecting different results"
    --Albert Einstein

  9. #9
    Full Member mdbriggs is on a distinguished road
    Join Date
    Jan 2004
    Location
    Lexington, KY
    Posts
    17

    Re: browser window resize onload

    Originally posted by mdbriggs
    i had forgotten how to do this. some might find it useful.

    <script language="javascript">
    window.resizeTo(600,800);
    </script>


    to make you window open at 600 by 800


    You can resize the browser RE: my first post. Even if you didn't create it. That will resize the page as it opens. My only question is how I might get it to rid itself of scroll bars and menu and status bars.
    mdbriggs - http://mdbriggs.com
    "I can't understand why people are frightened of new ideas. I'm frightened of the old ones." - John Cage

  10. #10
    Full Member HellFear is on a distinguished road
    Join Date
    Jun 2004
    Posts
    69

    Re: Re: browser window resize onload

    Originally posted by mdbriggs


    You can resize the browser RE: my first post. Even if you didn't create it. That will resize the page as it opens. My only question is how I might get it to rid itself of scroll bars and menu and status bars.
    As Marshall stated:
    Use this

    toolbar=0,scrollbars=0,location=0,statusbar=0,menu
    bar=0,resizable=0,width=1024,height=768 to make it a popup with no bars at all, you have to use it in a window open command though

  11. #11
    Active Member the illest is on a distinguished road
    Join Date
    Jun 2004
    Posts
    152
    Where do you put the toolbar=0 and all that good jazz though? Just inside the script tags like you gave it there?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

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