473,322 Members | 1,408 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Fullscreen Mode

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.
--
John Bankhead
Nov 19 '05 #1
2 2463
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

"John Bankhead" <Jo**********@discussions.microsoft.com> wrote in message
news:12**********************************@microsof t.com...
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.
--
John Bankhead

Nov 19 '05 #2
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.

"John Timney (ASP.NET MVP)" wrote:
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

"John Bankhead" <Jo**********@discussions.microsoft.com> wrote in message
news:12**********************************@microsof t.com...
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.
--
John Bankhead


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Paul Munly | last post by:
Hi, I'm attempting to get a Swing application to go into Exclusive Fullscreen mode and am curious if there's something that I need to do prior to attempting to grab the fullscreen window. The...
14
by: Goldie | last post by:
Hi, I am pretty poor at JavaScript so if this is a stupid question I apologise in advance. I am wanting to make the index.html page of a site open the browser up in Full screen mode. I...
20
by: msa | last post by:
Hi there, First off, let me say that I know that launching to full screen is a bad idea. I would never do it given the choice, but I must follow orders from my boss, the boss that desparately...
1
by: efrat.yahav | last post by:
Hi, I really need your help here, I looked all over and couldn't find an answer to my problem: I developed a flash-based site in which I have a gallery of pictures and when the user presses a...
2
by: Steffen Loringer | last post by:
Hi, can I force the InternetExplorer to fullscreen mode (F11) with my code? Sometimes webpages open up a window without menubars etc. Thanks Steffen
0
by: n_g | last post by:
how do i popup a message when user is running other fullscreen application? eg: i want to display phone number in corner of screen even user is playing fullscreen directx/opengl game or watching...
8
by: Andre | last post by:
Hi, I have this code, and he's working for about 2 years now. With a recent computer change, he stop to work (with IE6). Now i always have the titlebar and statusbar. window.open(theURL,...
2
by: samuelberthelot | last post by:
Hi, How can I switch the browser back and forth to fullscreen mode, using javascript on the onclick event of a button ? Thanks
2
by: boyindie86 | last post by:
Hi I am trying to work out if it is possible to write a bit of javascript, which will set a flash movie to fullscreen mode. As at the moment the player only provides a tiny button which will set...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.