Resize html window on Startup from cd-rom

Discussion in 'HTML' started by Rob, Jan 15, 2004.

  1. Rob

    Rob Guest

    Hi,

    I have some problems resizing a html page when it is loaded.
    I want the page to resize to the screensize.

    The following snipped of code (see below) works perfect on my Windows NT.
    but not on my Windows 98.

    Windows 98 with Ms Explorer 6.0.2800.1106IS
    Update versions:; SP1; q313829; Q328970; Q330994; Q813389l Q818529; Q824145;

    What am I doing wrong.

    It is from a site that I am constructing at:
    http://test.comweb.nl/pereira/newsite2/

    Thanks for any comments on how to solve this problem.
    Rob.




    <!-- resize window to wanted size -->
    <SCRIPT LANGUAGE="JavaScript" type="text/javascript">
    function sizeWindow()
    {
    width=window.screen.width;
    height=window.screen.height;
    window.moveTo(0,0);
    window.resize(width,height);
    }
    //-->
    </SCRIPT>

    <BODY bgcolor="#DEEFF8" topmargin="0" leftmargin="15" marginwidth="15"
    marginheight="0" onLoad="sizeWindow();">
     
    Rob, Jan 15, 2004
    #1
    1. Advertising

  2. Quoth the raven named Rob:

    > I have some problems resizing a html page when it is loaded.
    > I want the page to resize to the screensize.
    >
    > The following snipped of code (see below) works perfect on my Windows NT.
    > but not on my Windows 98.

    <snip>

    Which browser are you using? Your resize will not do anything in my
    browsers as I have turned off the option to allow web pages to resize
    my window. It's my window, not yours. This function is available on
    most modern browsers. Most visitors will think it rude of you to
    resize and move around their window.

    Aside: with JavaScript disabled, all I see at your page is a
    background graphic.

    --
    -bts
    -This space intentionally left blank.
     
    Beauregard T. Shagnasty, Jan 15, 2004
    #2
    1. Advertising

  3. Rob <> wrote:
    > What am I doing wrong.


    Don't try to control the user's browser. There's resize and fullscreen
    functions already built into browsers, and there's no need to add your
    obtrusive code.

    > <BODY bgcolor="#DEEFF8" topmargin="0" leftmargin="15" marginwidth="15"
    > marginheight="0" onLoad="sizeWindow();">


    Fix your errors:
    http://validator.w3.org/check?uri=http://test.comweb.nl/pereira/newsite2/
    --
    Michael Wilcox
    mjwilco at yahoo dot com
    Essential Tools for the Web Developer - http://mikewilcox.t35.com
     
    Michael Wilcox, Jan 15, 2004
    #3
  4. Rob

    rf Guest

    "Rob" <> wrote in message
    news:WKCNb.208$O41.817@amstwist00...
    >
    > Hi,
    >
    > I have some problems resizing a html page when it is loaded.
    > I want the page to resize to the screensize.


    > window.resize(width,height);


    resizeTo ?

    Cheers
    Richard.
     
    rf, Jan 15, 2004
    #4
  5. Rob

    rf Guest

    "Beauregard T. Shagnasty" <> wrote in message
    news:VSDNb.6592$...

    > Most visitors will think it rude of you to
    > resize and move around their window.


    Er, it's on a cd-rom, as per the subject line. I'd hardly expect many
    visitors to a cd-rom :)

    Cheers
    Richard.
     
    rf, Jan 16, 2004
    #5
  6. Rob

    Duende Guest

    While sitting in a puddle rf scribbled in the mud:

    >
    > "Beauregard T. Shagnasty" <> wrote in message
    > news:VSDNb.6592$...
    >
    >> Most visitors will think it rude of you to
    >> resize and move around their window.

    >
    > Er, it's on a cd-rom, as per the subject line. I'd hardly expect many
    > visitors to a cd-rom :)
    >

    You never know where Brucie will show up.



    --
    Duende
     
    Duende, Jan 16, 2004
    #6
  7. Rob

    Mark Parnell Guest

    On Fri, 16 Jan 2004 00:52:15 GMT, "rf" <> declared
    in alt.html,comp.lang.javascript:
    > "Beauregard T. Shagnasty" <> wrote in message
    > news:VSDNb.6592$...
    >
    >> Most visitors will think it rude of you to
    >> resize and move around their window.

    >
    > Er, it's on a cd-rom, as per the subject line. I'd hardly expect many
    > visitors to a cd-rom :)
    >


    I missed the CD-ROM bit on first read, too. The OP really should have
    mentioned it in the body of the message as well. Especially since he
    gave a URL. :)

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Jan 16, 2004
    #7
  8. Quoth the raven named Mark Parnell:

    > On Fri, 16 Jan 2004 00:52:15 GMT, "rf" <> declared
    > in alt.html,comp.lang.javascript:
    >
    >>"Beauregard T. Shagnasty" <> wrote in message
    >>news:VSDNb.6592$...
    >>
    >>>Most visitors will think it rude of you to
    >>>resize and move around their window.

    >>
    >>Er, it's on a cd-rom, as per the subject line. I'd hardly expect many
    >>visitors to a cd-rom :)

    >
    > I missed the CD-ROM bit on first read, too. The OP really should have
    > mentioned it in the body of the message as well. Especially since he
    > gave a URL. :)


    I missed it in the subject line as well. Still don't see the need to
    try to force the window, even if it is on a CD.

    --
    -bts
    -This space intentionally left blank.
     
    Beauregard T. Shagnasty, Jan 16, 2004
    #8
  9. Rob

    Mark Parnell Guest

    On Fri, 16 Jan 2004 05:00:11 GMT, "Beauregard T. Shagnasty"
    <> declared in alt.html,comp.lang.javascript:
    >
    > I missed it in the subject line as well. Still don't see the need to
    > try to force the window, even if it is on a CD.


    Me either, though it is probably not quite as bad as on a www page.

    It is worth noting to the OP, however, that a number of browsers have
    the option to stop Javascript from resizing the window, and all have the
    option to disable Javascript altogether. So unless you are working in an
    intranet (in which case why would you need a CD?) where you know the
    exact environment, you can never guarantee it is going to work.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Jan 16, 2004
    #9
  10. Rob

    rf Guest

    "Beauregard T. Shagnasty" <> wrote in message
    news:vdKNb.84161$...
    > Quoth the raven named Mark Parnell:
    >
    > > On Fri, 16 Jan 2004 00:52:15 GMT, "rf" <> declared
    > > in alt.html,comp.lang.javascript:
    > >
    > >>"Beauregard T. Shagnasty" <> wrote in message
    > >>news:VSDNb.6592$...
    > >>
    > >>>Most visitors will think it rude of you to
    > >>>resize and move around their window.
    > >>
    > >>Er, it's on a cd-rom, as per the subject line. I'd hardly expect many
    > >>visitors to a cd-rom :)

    > >
    > > I missed the CD-ROM bit on first read, too. The OP really should have
    > > mentioned it in the body of the message as well. Especially since he
    > > gave a URL. :)

    >
    > I missed it in the subject line as well. Still don't see the need to
    > try to force the window, even if it is on a CD.


    Go and have a look at the web site mentioned in the OP:
    http://test.comweb.nl/pereira/newsite2/

    He *has* to run the browser full screen because he is using some stupid
    looking javascript skulduggery to document.write his images, client side
    resized to 90% of the physical screen size.

    If the browser is not full screen (as mine was not when I looked, and thanks
    to the error of using resize instead of resizeTo) I only got about 30% of
    the full sized 1600x1200 image.

    Message to Rob: Do Not Do This! It makes the images look like they were
    painted with a broom rather than an artists brush.

    Cheers
    Richard.
     
    rf, Jan 16, 2004
    #10
  11. Quoth the raven named rf:

    > Go and have a look at the web site mentioned in the OP:
    > http://test.comweb.nl/pereira/newsite2/


    I did. See my first post in this thread, where I said:

    "Aside: with JavaScript disabled, all I see at your page is a
    background graphic."

    > He *has* to run the browser full screen because he is using some stupid
    > looking javascript skulduggery to document.write his images, client side
    > resized to 90% of the physical screen size.


    Rhetorical: Where do deezyners learn about this stuff? <g>

    --
    -bts
    -This space intentionally left blank.
     
    Beauregard T. Shagnasty, Jan 16, 2004
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joakim G.

    Blank Applet Window on startup?

    Joakim G., Oct 5, 2003, in forum: Java
    Replies:
    0
    Views:
    613
    Joakim G.
    Oct 5, 2003
  2. Parse HTML to store it in ROM

    , Jun 15, 2005, in forum: C Programming
    Replies:
    1
    Views:
    272
    CBFalconer
    Jun 15, 2005
  3. hangeonos
    Replies:
    0
    Views:
    774
    hangeonos
    May 24, 2009
  4. Steven Green
    Replies:
    2
    Views:
    131
    Steven Green
    Sep 18, 2003
  5. Replies:
    2
    Views:
    1,266
    Adrienne
    Feb 13, 2005
Loading...

Share This Page