Thread: sized box

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    sheffield
    Posts
    166
    Rep Power
    12

    sized box


    Hi,

    I am using Dreamweaver MX and am having trouble getting a page to open at a certain size... basically it opens too big

    is there a way i can limit the size?
  2. #2
  3. Senior Polecat
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    Jersey (the original version)
    Posts
    210
    Rep Power
    12
    yeah, there is a behaivour that allows you to use javascript to open the window at a certain size.

    failing that you can use javascript to resize the window onload. But bear in mind that a lot of users find it annoying when websites "take over" control of window sizing
    Quidquid latine dictum sit, altum viditur.

    http://www.XSet.co.uk
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    sheffield
    Posts
    166
    Rep Power
    12
    do u know the javascript for such an act?
  6. #4
  7. Senior Polecat
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    Jersey (the original version)
    Posts
    210
    Rep Power
    12
    the function call is:
    PHP Code:
    window.self.resizeTo(250,700); 
    but you need to play about with the sizing depending on what chroming is present in the user's browser
    Quidquid latine dictum sit, altum viditur.

    http://www.XSet.co.uk
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    sheffield
    Posts
    166
    Rep Power
    12
    ok will do

    so basically
    <javascript>
    window.self.resizeTo(250,700);
    </javascript>


    at the beginning of the page?
  10. #6
  11. Senior Polecat
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    Jersey (the original version)
    Posts
    210
    Rep Power
    12
    well id stick it in a function and call it from the body tag:
    <head>...
    <script type="text/javascript">
    function resize()
    {
    window.self.resizeTo(250,700);

    }
    </script>
    ...</head>
    <body onload="resize()">...

    but thats just me being finickity
    Quidquid latine dictum sit, altum viditur.

    http://www.XSet.co.uk

IMN logo majestic logo threadwatch logo seochat tools logo