Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Full screen button Date: Tue, 15 Mar 2016 08:44:23 +0100 Organization: PointedEars Software (PES) Lines: 39 Message-ID: <4449708.yzpMCgJpUJ@PointedEars.de> References: Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1458027866 23166 eJwFwYERAEEEA8CWnBCUY/yk/xJ+N8HHq2AyUimdrGz8tYJwbrVkmdb3veniegOsHfDQ/gMJJw/5 (15 Mar 2016 07:44:26 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Tue, 15 Mar 2016 07:44:26 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwFwYkBwCAIA8CVyhOM42Ax+4/gHaKs/pWFSgi6527XtQTC6Z2nG06IC+x2dQqkMBEZ4zWFZdif9hhND1MeFRg= Cancel-Lock: sha1:42QAxpPWiKjo6ZHlG8osgnQ9ERQ= X-NNTP-Posting-Host: eJwFwYcBwDAIA7CXwrAJ56SM/0+oBKOwwgk6Fnt2gm2yn2+7QSra32al8OGqnHHeCQ2cmtQfIbUQ3A== Xref: csiph.com comp.lang.javascript:29995 emf wrote: ^^^ For the last time now, get a real name. > I need a button to turn the browser to full-screen mode to run some eye > exercises: > > http://emf.neocities.org/ix/eyeExercises.html OK. > 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: > > […] > } else if (typeof window.ActiveXObject !== "undefined") { > // Older IE. > var wscript = new ActiveXObject("WScript.Shell"); > if (wscript !== null) { > wscript.SendKeys("{F11}"); > } You do not want to do *that*. > How can I make it stay in full screen when you click on a link, like > when you press F11? AFAIK, and I think unfortunately, you cannot. You should design the exercises so that they work with any viewport size. And you should use CSS animations if possible. At least read on how to create smooth animations with scripting as your current eye tests do not have smooth movement. -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.