2

Is it possible to switch the browser into and out of full screen mode (simulate an F11 key press) from Javascript?

I want to have a button that will make the switch. This have to affect the current browser window, it can't open a new window.

M.S
  • 1,580
  • 1
  • 13
  • 22
  • I very much doubt it. You can resize the window to make it larger, but probably remove the navigation stuff, but not full screen mode – user606723 Jul 21 '11 at 20:31
  • considering that that would be browser specific... I highly doubt it. – Joseph Marikle Jul 21 '11 at 20:33
  • see this question http://stackoverflow.com/questions/1125084/how-to-make-in-javascript-full-screen-windows-stretching-all-over-the-screen – Greg Guida Jul 21 '11 at 20:35
  • 1
    @GregGuida yeah I saw that question, but the solution there resizes the browser window, rather than switch to full screen mode as you with with F11. – M.S Jul 21 '11 at 22:22
  • This article really helped me http://johndyer.name/native-fullscreen-javascript-api-plus-jquery-plugin/ – Shadrack Orina Aug 01 '12 at 13:51

2 Answers2

1

You can open new javascript window in full screen mode (called theater mode). Not sure what all browser do support at this time, but IE used to do. You cannot access the current window ability to enlarge to full window.

hungryMind
  • 6,931
  • 4
  • 29
  • 45
0

I certainly hope it's not possible : do you realize how much that would be abused ?

Do you remember about popups and ads, a couple of years ago ?
Do you imagine how it would be like if those ad-popup would have been able to switch to full-screen ?

Pascal MARTIN
  • 395,085
  • 80
  • 655
  • 663
  • 1
    While I agree with you, this is a comment. Not an answer. – Jonathan M Jul 21 '11 at 20:32
  • 1
    It was kind of meant as an answer, actually (like "it's not been used, so it's not possible") -- but, re-reading my answer, I see your point, I might have written this another way. – Pascal MARTIN Jul 21 '11 at 20:35
  • That would be solved by a simple question "Do you want to put this window in fullscreen?" A comment. Not an answer. – TheAgent May 06 '13 at 10:23