Fullscreen Mode

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to detect if the browser is in full screen mode? I see
several posts about how to set fullscreen mode and how it cant be done, but
nothing about how to detect it.
 
I would look at detecting what the screen size max is, and then check the
actual available width and height of the browser window to see if they
match.

You'll need a couple of bits of javascript - something like this for the
browser size

For netscape: probably
window.innerWidth;
window.innerHeight;

For IE - probably
window.document.body.clientWidth;
window.document.body.clientHeight;

and a bit of script to get the actualk screen width
if (document.layers || document.all) {
w = screen.availWidth;
h = screen.availHeight;
}Not tried any of these though, you'll have to wing it and see how it goes.
You may need to compensate anywhere for scrollbar widths.-- Regards
John Timney
ASP.NET MVP
Microsoft Regional Director
 
That was my original approach. Unfortunately that method does not
distinguish between full screen mode(F11) and maximized. There are several
pages in the application that display more data than makes good sense, and I
want to be able to tell the user that he should hit F11 for the best
presentation of data. Preferably as a modal.
 
Back
Top