Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #30030

Re: Full screen button

From emf <emfril@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: Full screen button
Date 2016-03-17 03:58 -0400
Organization Aioe.org NNTP Server
Message-ID <ncdo2p$1upf$1@gioia.aioe.org> (permalink)
References <nc7njs$1509$1@gioia.aioe.org> <nc8krh$7ge$1@news.albasani.net>

Show all headers | View raw


On 2016-03-15 05:32, Stefan Weiss wrote:
> On 03/15/2016 02:13, emf wrote:
>> I need a button to turn the browser to full-screen mode to run some eye
>> exercises:
>>
>> http://emf.neocities.org/ix/eyeExercises.html
>>
>> I've found some code on the web that does this for the current page, but
>> returns to browser to normal screen when clicking on a link:
>>
>> function requestFullScreen() {
> [snip]
>> How can I make it stay in full screen when you click on a link, like
>> when you press F11?
>
> As far as I know, that's not possible, but you can use a workaround:
> navigation inside an iframe will preserve the fullscreen mode, so you
> could just load the whole thing in an iframe.
>
> Demo: http://foo.at/paste/2016/03-emf/
>
> Note that the onclick attribute on the button has also changed.
>
> - stefan

Thanks Stefan! Excellent solution. I only vaguely remember reading about 
iframe -- I did not consider it relevant to me at the time -- but now be 
sure I'll educate myself on the issue in the near future.

The only problem now is the addition on top of the alert of the line:

"The page at http://emf.neocities.org says:"

(at least with Firefox). Is there a way to avoid this, or would you 
suggest an alternative?

One possibility now, of course, would be to eliminate the alert 
entirely; a main reason I had included the alerts was that sometimes I 
would click on the link before entering full screen mode. Now this seems 
less of an issue...

Eustace

-- 
Spherical Triangle Calculator
http://emf.neocities.org/tr/spherical.html

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Full screen button emf <emfril@gmail.com> - 2016-03-14 21:13 -0400
  Re: Full screen button Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-15 08:44 +0100
    Re: Full screen button John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-15 09:44 +0000
      Re: Full screen button "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-15 12:16 +0100
        Re: Full screen button John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-15 20:13 +0000
          Re: Full screen button "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-15 22:18 +0100
            Re: Full screen button John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-16 15:56 +0000
              Re: Full screen button "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-16 17:36 +0100
                Re: Full screen button John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-17 10:44 +0000
                Re: Full screen button "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-17 13:31 +0100
                Re: Full screen button John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-18 09:28 +0000
                Re: Full screen button "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-18 10:42 +0100
                Re: Full screen button Aleksandro <aleksandro@gmx.com> - 2016-03-17 23:30 -0300
    Re: Full screen button emf <emfril@gmail.com> - 2016-03-17 06:03 -0400
      Re: Full screen button "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-03-17 11:51 +0100
    Re: Full screen button Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-03-20 21:12 +0000
  Re: Full screen button Stefan Weiss <krewecherl@gmail.com> - 2016-03-15 10:32 +0100
    Re: Full screen button Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-15 22:34 +0100
    Re: Full screen button emf <emfril@gmail.com> - 2016-03-17 03:58 -0400
      Re: Full screen button emf <emfril@gmail.com> - 2016-03-17 04:45 -0400
  Re: Full screen button markluvji1@gmail.com - 2016-07-23 04:37 -0700

csiph-web