tags:

views:

62

answers:

4

Hello All-

I have a htm page that I need to update so that when it is opening it will open at fullscreen. What is the code that I need to place within this page to do so?

A: 

Don't do this. Firefox doesn't implement this because people just don't like it. You should assume users have their browser the size they want for a reason.

Nissan Fan
That won't work in modern browsers.
SLaks
You're right. Updated to focus on my key point, which is to not do it.
Nissan Fan
A: 

This is not possible.

SLaks
It is in most versions of IE, but as you point out not other browsers.
Nissan Fan
@Nissan: Not in recent versions. I think it was disabled in IE7.
SLaks
I was able to get it to work in IE8 and IE7, but I think the most important thing is that it shouldn't be used at all.
Nissan Fan
+1  A: 

Most browsers don't support opening windows in fullscreen. I suggest you only use the document size you are given.

digitalFresh
A: 

You can't (and shouldn't) force fullscreen, but you can (though probably shouldn't) use Javascript to maximize the window size:

window.outerWidth = screen.availWidth;
window.outerHeight = screen.availHeight;

But as previous people have stated, resizing a user's window is likely going to annoy him.

If fullscreen is really important for your application, you might consider giving the user instructions to switch to this mode manually. You COULD use Javascript to customize these instructions to a users' browser/OS.

Seth