468,107 Members | 1,273 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

resize to full screen but leave window resizeable?

Els
Hi, i have the following script in the head of my document:

<script language="Javascript">
<!--
// ***********************************************
// AUTHOR: WWW.CGISCRIPT.NET, LLC
// URL: http://www.cgiscript.net
// Use the script, just leave this message intact.
// Download your FREE CGI/Perl Scripts today!
// ( http://www.cgiscript.net/scripts.htm )
// ***********************************************
window.moveTo(0,0)
window.resizeTo(screen.width,screen.height)
//-->
</script>
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript"><!--var NN2 =
(navigator.appName == "Netscape") &&
navigator.userAgent.indexOf("Mozilla/2") != -1);function
VensterFocus() {if (!NN2) {self.focus();}}//-->
</SCRIPT>

But I want my visitors to be able to resize the screen. How do I alter
the a.m. script? (I have no clue whatsoever about javascript, so
please be very precise :-))
(In IE 5 it is indeed resizeable, but it isn't in IE 6 and others)

Thanks in advance,
Sincerely,

Els

Jul 20 '05 #1
8 15399
Els wrote:
Hi, i have the following script in the head of my document: window.moveTo(0,0)
window.resizeTo(screen.width,screen.height)


Argh! Please no!

http://david.us-lot.org/www/dumb/fullscreen.jpeg

If users want a fullscreen window, then they are quite capable of clicking
maximise, hitting F11, or whatever else will create a fullscreen window on
their system.

--
David Dorward http://david.us-lot.org/
Which is stupider: Pop-up ads claiming they'll stop spam, or spam claiming
it'll stop pop-up ads? -- Dork Tower
Jul 20 '05 #2
Els

"David Dorward" <do*****@yahoo.com> schreef in bericht
news:bg*******************@news.demon.co.uk...
Els wrote:
Hi, i have the following script in the head of my document:
window.moveTo(0,0)
window.resizeTo(screen.width,screen.height)


Argh! Please no!

http://david.us-lot.org/www/dumb/fullscreen.jpeg


Argh! Please no! No hidden source code!! Now I can't figure out how
you made that cute little button on the bottom right corner! ;-)

By the way: the folder 'dumb' must be meant for me, 'cause I don't
understand what this jpeg has to do with me wanting to do a
window.resize, unless you're only referring to the mentioned button.
If users want a fullscreen window, then they are quite capable of clicking maximise, hitting F11, or whatever else will create a fullscreen window on their system.
Yes, so, that's your opinion (and of a lot of others, I know, don't
respond, everyone), but I want it to do it this way and therefore I
asked a question.
Please answer it? (the name of this group is "comp.lang.javascript",
not "comp.ethics.publicopinion.javascript".... ;-))
-no sarcasm intended-

Thanks in advance,
Sincerely,

Els
Which is stupider: Pop-up ads claiming they'll stop spam, or spam claiming it'll stop pop-up ads? -- Dork

Tower

Jul 20 '05 #3
Els

"David Dorward" <do*****@yahoo.com> schreef in bericht
news:bg*******************@news.demon.co.uk...
Els wrote:
> window.moveTo(0,0)
> window.resizeTo(screen.width,screen.height) http://david.us-lot.org/www/dumb/fullscreen.jpeg
It is a demonstration of what happens when people use the code your
suggested on a system. It ends up with a large chunk of the window
appearing in dead space, and a three inch gap between the two remaining parts.
I can see that result on the jpeg, but as you didn't provide the
source code, I couldn't compare the code to mine, as with my own page,
using this piece of script, nothing like that happens. (not in IE6,
NN7 or Opera7)
check: www.rachelrijsdijk.com click the face and see what happens.
(Don't worry about the frames, I'm already working on a frameless
version)
Yes, so, that's your opinion (and of a lot of others, I know, don't respond, everyone), but I want it to do it this way and therefore I asked a question.


This is Usenet, you get unsolicited advice. Live with it. I was

warning you of the problems you can face (and that's just in the area of making your content unreadable, I haven't touched on how much it can annoy people even when it works as expected).
I don't mind the unsolicited advice at all, in fact, I find it quite
usefull at times.
But....
You didn't answer my initial question: how do I allow my visitors to
resize the screen after I made it full screen width?
(That's what is annoying my visitors most at the moment.)
--
David Dorward http://david.us-lot.org/ Which is stupider: Pop-up ads claiming they'll stop spam, or spam claiming it'll stop pop-up ads? -- Dork

Tower

I'm not sure, I think they're equally stupid.
The stupidest however, would be the pop-up claiming it'll stop
pop-ups.
Or the spam claiming it will stop spam ;-)

Sincerely,
Els
Jul 20 '05 #4
Els wrote:
I can see that result on the jpeg, but as you didn't provide the
source code, I couldn't compare the code to mine, as with my own page,
using this piece of script, nothing like that happens. (not in IE6,
NN7 or Opera7) check: www.rachelrijsdijk.com click the face and see what happens.


Exactly the same thing happens here as in the screenshot I referred to
earlier. I suspect that you use a different system to run multiple
monitors.

--
David Dorward http://david.us-lot.org/
Which is stupider: Pop-up ads claiming they'll stop spam, or spam claiming
it'll stop pop-up ads? -- Dork Tower
Jul 20 '05 #5
"Els" <el*********@PLEASEtiscali.nl> writes:

Please don't top post.
I can see that result on the jpeg, but as you didn't provide the
source code, I couldn't compare the code to mine,
I recognized the jpeg as showing the result of code *exactly* like
yours on a computer with two screens attached and a desktop that spans
the screen.
as with my own page,
using this piece of script, nothing like that happens. (not in IE6,
NN7 or Opera7)
.... because *you* don't have two screens.
check: www.rachelrijsdijk.com click the face and see what happens.
(Don't worry about the frames, I'm already working on a frameless
version)


I don't have two screens either, but I do use Opera 7. This is the result:
<URL:http://www.infimum.dk/privat/fullscreenFails.jpg>
(You can ignore the red "[body]"'s, it's just my user stylesheet telling
me that the link targets).

If I came to a page like this, I should be very motivated before I
used the vertical scroll bar. There should be money involved before I
would maximize the browser (and then the bottom of the page would
still be obscured).

Listen when people tell you that opening full-screen windows is very
annoying.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #6
Els

"David Dorward" <do*****@yahoo.com> schreef in bericht
news:bg*******************@news.demon.co.uk...
Els wrote:
I can see that result on the jpeg, but as you didn't provide the
source code, I couldn't compare the code to mine, as with my own page, using this piece of script, nothing like that happens. (not in IE6, NN7 or Opera7)
check: www.rachelrijsdijk.com click the face and see what happens.


Exactly the same thing happens here as in the screenshot I referred

to earlier. I suspect that you use a different system to run multiple
monitors.


Ehh... no, I didn't realize that you were talking about using multiple
monitors.
(I told you the 'dumb'-folder was meant for me ;-))

I get your point now, thanks.
But.... is there a way you (or anyone) could still answer my question?
Even just for the sake of curiosity??

Thanks, sincerely,
Els
Jul 20 '05 #7
"Els" <el*********@PLEASEtiscali.nl> wrote in message
news:bg**********@reader1.tiscali.nl...
<snip>
If I came to a page like this, I should be very motivated
before I used the vertical scroll bar. There should be money
involved before I would maximize the browser (and
then the bottom of the page would still be obscured).


Are you saying that you didn't at all, not even once,
maximize your browser to see what the page looked
like? Sure?


I certainly do not ever maximise a browser window. In fact there is only
one application that I ever use full-screen and that is a 3D graphics
package, which was why I bought a 24 inch monitor in the first place.

I doubt that David maximises windows often (if ever) for reasons that
should be apparent from his original screen-shot.

In my case, if a window attempts to monopolise my monitor I will usually
have hit Alt+F4 before it has even had a chance to download anything.

Incidentally, one of the obvious (among many) and easily corrected
faults in the original script is that it does not check to see how big
the screen actually is. In almost all cases it just doesn't make sense
to make a browser window bigger than the biggest it could be on a 17
inch monitor (that is; anyone who designed a page that required a
display bigger than a 17 inch monitor should not be designing web
pages). It is easy enough to perform a comparison on the dimensions
returned for the screen and default them to a maximum value if they are
bigger than required. Though that would still not work well on David's
multi-monitor set-up or on Opera.

But a fluid page design, in a window with user specified chrome and left
to the user to re-size/position to suite, is what everyone is used to
and capable of coping with (and happy with).

Richard.
Jul 20 '05 #8
"Els" <el*********@PLEASEtiscali.nl> writes:
"Lasse Reichstein Nielsen" <lr*@hotpop.com> schreef in bericht
news:sm**********@hotpop.com...
Please don't top post.
Did I??


Duh, no. Don't know how I got that idea. Sorry.
It still looks different (a bit) in 'my Opera 7' though. I don't get
the tiny space between the topframe and the menuframe,
I get that in both O7.11 and O7.20beta2.
nor the whiteborder on the left and top of the topframe,
I don't get those in O7.11 either. It can be a beta issue.
but maybe that's how you configured Opera? It seems like the top and
menu frames are smaller than in 'my Opera7', therefore the words of
the menu wrap. On my screen they don't...
I have
body {font-size:100% !important;}
which can throw off some people's attempt at small fonts, but they
don't wrap in O7.11 (where I don't add the "[body]" after the links).
Are you saying that you didn't at all, not even once, maximize your
browser to see what the page looked like?
Maybe I did once. I was young and needed the money! But seriously, I
only use full screen mode when I am testing something in Opera's
projection mode. E.g., the link in my signature looks differently in
Opera's full screen (F11) mode.
Sure?
Almost. I had to be very interested first ... but, OK, I don't need
money for it ... most of the time.
Yes, I do listen, but I always try to investigate matters further than
just believing everyone.
Unless it matches my preconcieved opinions, ofcourse.
My guess is that you do that too. :-)


"Flattery will get you everywhere." - Mae West

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by pow67 | last post: by
6 posts views Thread by David Hayes | last post: by
14 posts views Thread by franz | last post: by
3 posts views Thread by mindseeker | last post: by
5 posts views Thread by James Black | last post: by
5 posts views Thread by Doug Gunnoe | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.