469,270 Members | 1,056 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

Resize html window on Startup from cd-rom

Rob

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();">


Jul 20 '05 #1
10 1898
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.
Jul 20 '05 #2
Rob <NO****@NOWHERE.HELL> 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=ht...eira/newsite2/
--
Michael Wilcox
mjwilco at yahoo dot com
Essential Tools for the Web Developer - http://mikewilcox.t35.com
Jul 20 '05 #3
rf

"Rob" <NO****@NOWHERE.HELL> 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.
Jul 20 '05 #4
rf

"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in message
news:VS*****************@twister.nyroc.rr.com...
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.
Jul 20 '05 #5
While sitting in a puddle rf scribbled in the mud:

"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in message
news:VS*****************@twister.nyroc.rr.com...
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
Jul 20 '05 #6
On Fri, 16 Jan 2004 00:52:15 GMT, "rf" <ma**********@the.time> declared
in alt.html,comp.lang.javascript:
"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in message
news:VS*****************@twister.nyroc.rr.com...
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
Jul 20 '05 #7
Quoth the raven named Mark Parnell:
On Fri, 16 Jan 2004 00:52:15 GMT, "rf" <ma**********@the.time> declared
in alt.html,comp.lang.javascript:
"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in message
news:VS*****************@twister.nyroc.rr.com. ..
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.
Jul 20 '05 #8
On Fri, 16 Jan 2004 05:00:11 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> 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
Jul 20 '05 #9
rf

"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in message
news:vd*******************@twister.nyroc.rr.com...
Quoth the raven named Mark Parnell:
On Fri, 16 Jan 2004 00:52:15 GMT, "rf" <ma**********@the.time> declared
in alt.html,comp.lang.javascript:
"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in message
news:VS*****************@twister.nyroc.rr.com. ..

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.

Jul 20 '05 #10
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.
Jul 20 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Charles Packer | last post: by
4 posts views Thread by David Logan | last post: by
8 posts views Thread by Michael Satterwhite | last post: by
3 posts views Thread by alazar_076 | last post: by
4 posts views Thread by al | last post: by
5 posts views Thread by Scott | last post: by
reply views Thread by msoliver | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.