tags:

views:

3076

answers:

8

I'm working on something that needs a webpage to go full screen. The screen must become completely white.

Is there anyway that I can do this without flash or silverlight? Something like ajax for example?

Thanks in advance

edit: Im not trying to force anybody into fullscreen, this will be mainly used by a couple of people. Even so I'll give proper feedback on how to get in and out of fullscreen .

A: 

No, you can't control the browser in that way with javascript.

Corin
+1  A: 

With JavaScript:

window.open ("http://stackoverflow.com", "","fullscreen=yes");

The size of the window varies between browsers, but actually in IE, you will have the desired behavior...

CMS
Thank you CMS. I've found that bit of code already, but it doesnt put if completely full screen, I still can see stuff like the title bar for example,
Artur Carvalho
A: 

Duplicate of http://stackoverflow.com/questions/228377/could-a-website-force-the-browser-to-go-into-fullscreen-mode

ypnos
Thanks for the answer ypnos. I dont think its a duplicate because you could use flash to do what you want and Im trying to avoid flash and silverlight. Although the answer you had does the job for me too.
Artur Carvalho
+2  A: 

You cant do full screen, because of security reasons the title bar is still there and so on in different browsers.

But a way could be to make the window larger than the screen, lets say 100 pixels wider and 100 pixels higher and position the window at -50, -50. I havent tried that but if there is no restrains against window size being bigger than screen size it could be a solution.

Stefan
That second one is a dangerous idea to give. Most users look for the X to close the window and this will let him hide it.
StingyJack
Yes. But If it possible to do, someone will do it.
Stefan
I don't think it's possible either to make a window bigger than the screen.
Adriano Varoli Piazza
+1  A: 

Please dont resize the user's web browser. I use the rest of my screen for other things, and I think many users do too. A respectful website stays where the browser puts it.

Karl
Karl, I know that can be irritating if you force the user to go full screen, but this is not the case. I use Acrobat Reader and Visual Studio full screen all the time nad I want that in my webpage.
Artur Carvalho
So then click the maximize button on your browser (or pick "full screen" from the menu if it's there), just like you do if Acrobat Reader or Visual Studio are in non-full-screen mode. If Acrobat Reader were to start automatically going fullscreen on me every time I open it, I'd use something else.
Dave Sherohman
+1  A: 

"Something like ajax for example?"...

Ajax != Javascript.

Your responsibility as a web site operator is to have some manners and allow the user to control the size.

You could read the screen.width and screen.height and if they are far off the document.body.clientHeight or document.body.clientWidth, alert the user that the page should be viewed in fullscreen mode and how to make it fullscreen (F12 for IE - i think, F11 for FF).

StingyJack
Yes, F11 fullscreens Firefox.
Dave Sherohman
A: 

You can instruct your users to use firefox 3, and press F11 to enter full screen mode. the title bar will go away if the mouse isn't near the top of the screen.

Yes, it requires user interaction, but if they want to go into full screen then it's easy for them to do so under their own power, and to leave again when they want to.

Adam Davis
A: 
 Well, I see that you are trying to simply have a button that will make the page full-screen; similar to the youtube full screen mode.

 As well, I do NOT suggest using the "just hit F11" method, as people on Safari, or Mac in general, will be excluded.

 You can use C#, which can be done by downloading Visual Studio or MS Visulal C#, or even CosmosBoot.  There is plenty of code for full screen applications in C#.  Another good thing about full screen in C# is that it can be easily embedded into a webpage, through some simplye ASP code.

 You can use java, which can be painfully slow, and require a lot of coding, but it is attainable.  You can use one of several hundred IDEs or JDKs, but I don't really use java, so I can't give you much in the way of advice on programming it, but it is EVEN EASIER to embed than C#, all you need is the <applet> tag.
Barack Obama