/    Sign up×
Community /Pin to ProfileBookmark

Resizing the page width

Hello everyone,

I have a small question (I hope). I am trying to design a simple page for the English Major Club at my school. The actual page will be inserted into a page width of 615 pxls. In the meantime as I am working on it and making sure everything will align correctly I am trying to get the page to open a window that is 615 pxls. Can anyone help me out with the code needed to do this? Thank you in advance!

to post a comment
HTML

7 Comments(s)

Copy linkTweet thisAlerts:
@The_Little_GuyJan 08.2006 — So, this window that you want to be opened, how will it open?

1.) when the main page is opened, it will automatically open a window that is 615px

2.) when you click on a link/button it will opne a window that is 615px

Was I even reading you question correctly?
Copy linkTweet thisAlerts:
@SamsonsamaauthorJan 08.2006 — yes exactly
Copy linkTweet thisAlerts:
@The_Little_GuyJan 08.2006 — [code=php]<FORM>
<INPUT type="button" value="New Window!" onClick="window.open('http://www.pageresource.com/jscript/jex5.htm','mywindow','width=400,height=200')">
</FORM>[/code]



Below is a list of the attributes you can use:

  • 1. [B]width[/B]=300

    Use this to define the width of the new window.


  • 2. [B]height[/B]=200

    Use this to define the height of the new window.


  • 3. [B]resizable[/B]=yes or no

    Use this to control whether or not you want the user to be able to resize the window.


  • 4. [B]scrollbars[/B]=yes or no

    This lets you decide whether or not to have scrollbars on the window.


  • 5. [B]toolbar[/B]=yes or no

    Whether or not the new window should have the browser navigation bar at the top (The back, foward, stop buttons..etc.).


  • 6. [B]location[/B]=yes or no

    Whether or not you wish to show the location box with the current url (The place to type http://address)">http://address).


  • 7. [B]directories[/B]=yes or no

    Whether or not the window should show the extra buttons. (what's cool, personal buttons, etc...).


  • 8. [B]status[/B]=yes or no

    Whether or not to show the window status bar at the bottom of the window.


  • 9. [B]menubar[/B]=yes or no

    Whether or not to show the menus at the top of the window (File, Edit, etc...).


  • 10. [B]copyhistory[/B]=yes or no

    Whether or not to copy the old browser window's history list to the new window.
  • Copy linkTweet thisAlerts:
    @SamsonsamaauthorJan 08.2006 — Outstanding! Thank you! Is there anyway to make the homepage load up at the desired width and height also?
    Copy linkTweet thisAlerts:
    @The_Little_GuyJan 08.2006 — So, now you asking after someone puts in the URL (http://xxx.com) the page will resize it self, to 615px by xxx?
    Copy linkTweet thisAlerts:
    @SamsonsamaauthorJan 08.2006 — Um...yes. Sorry for the trouble.
    Copy linkTweet thisAlerts:
    @The_Little_GuyJan 08.2006 — Try this:

    [code=html]<html>
    <body bgcolor="#FFFFFF">
    <title>CodeAve.com(Resize Window)</title>

    <script type="text/JavaScript">
    <!--
    // This will resize the window when it is opened or
    // refresh/reload is clicked to a width and height of 500 x 500
    // with is placed first, height is placed second
    window.resizeTo(500,500)
    -->
    </script>

    When the window is opened or
    refresh/reload are clicked the window will size to 500 x 500

    <script type="text/JavaScript">
    <!--
    // function to allow the changing of the window size by link
    // to a size of 400 x 300
    function resize_2_400x300()
    {
    window.resizeTo(400,300)
    }
    -->
    </script>

    <br>

    Click <a href="javascript:resize_2_400x300()">here</a> to resize
    the window to 400 x 300

    <script type="text/JavaScript">
    <!--
    // function to allow the changing of the window size by link
    // to a size of 800 x 600
    function resize_2_800x600()
    {
    window.resizeTo(800,600)
    }
    -->
    </script>

    <br>

    Click <a href="javascript:resize_2_800x600()">here</a> to resize
    the window to 800 x 600

    <script type="text/JavaScript">
    <!--
    // function to allow the changing of the window size by link
    // to the maximum local screen width and height
    function resize_2_local_settings()
    {
    window.resizeTo(screen.width,screen.height)
    }
    -->
    </script>

    <br>

    Click <a href="javascript:resize_2_local_settings()">here</a> to resize
    the window to the max local settings
    <script language="JavaScript">
    <!--
    document.write (screen.width + ' x ' + screen.height)
    -->
    </script>

    <script type="text/JavaScript">
    <!--
    // function to allow the changing of the window size by link
    // the width and height are passed as variables within the link
    function resize_2_link(x,y)
    {
    window.resizeTo(x,y)
    }
    -->
    </script>

    <br>

    Click <a href="javascript:resize_2_link('640','480')">here</a> to resize
    the window to varibles conatined within the link (640 x 480)

    </body>
    </html>[/code]
    ×

    Success!

    Help @Samsonsama spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.19,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...