www.webdeveloper.com
Results 1 to 10 of 10

Thread: real fullscreen for Firefox, mozilla and so on

  1. #1
    Join Date
    Feb 2005
    Posts
    2

    real fullscreen for Firefox, mozilla and so on

    Hi,

    I'm looking for a way to open a real fullscreen window. For IE it's easy, but I did not find any way for Firefox and so on. What I want is only see me webpage and nothing else on the screen (no titlebar, no scrollbar, no adress bar, nothing except my page). Is there any way for this? It works in IE so maybe it works with other browsers...

    thx Micky

  2. #2
    Join Date
    May 2003
    Location
    Between Baltimore and DC
    Posts
    3,579
    You are not going to get it since Fullscreen is IE only. Best thing you will get is making the window stretch the full length of the screem. BUT, peoplpe really realy really hate this especially when they have a big screen. PLUS browsers now-a-days can block the resizing of the browser window.

    IMO: Better to not try it....

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint] | twitter | linkedin | http://www.pascarello.com

  3. #3
    Join Date
    Feb 2005
    Posts
    2
    Hi Eric,

    Thx for the advice. I will explain it my boss. But for big screen I would not use the fullscreen, but only for 1024*768 or less. The other would get a window sized to 1024*768. What is important is to have no scrollbar, no address bar, no menu bar and if possible no title bar and no borders.

    Micky

  4. #4
    Join Date
    May 2003
    Location
    Between Baltimore and DC
    Posts
    3,579
    You can remove basically everything but the titlebar and borders with a normal pop up window....

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint] | twitter | linkedin | http://www.pascarello.com

  5. #5
    Join Date
    Feb 2005
    Location
    Sydney, Australia
    Posts
    103
    People can really hate anything if they put their mind to it... but there might be a very good reason for wanting to do this fullscreen thing:

    Here's my way:

    The "fullscreen.html" file loads "chooser.html" which then automatically opens either "fullscreenpage(1024).html" or "fullscreenpage(800).html" within itself to the correct resolution of the user's monitor. Of course, you could check for more resolutions and have more versions of "fullscreenpage.html" if you wish.

    ********************************

    This is the code for the file fullscreen.html:

    <html>
    <head>
    <title>Demo Fullscreen</title>
    <script language="JavaScript">
    <!--
    var secs
    var timerID = null
    var timerRunning = false
    var delay = 500
    function InitializeTimer()
    {
    // Set the length of the timer, in seconds
    secs = 4
    StopTheClock()
    StartTheTimer()
    }
    function StopTheClock()
    {
    if(timerRunning)
    clearTimeout(timerID)
    timerRunning = false
    }
    function StartTheTimer()
    {
    if (secs==0)
    {
    openFullscreen('http://www.mysite.com/chooser.html');
    }
    else
    {
    self.status = secs
    secs = secs - 1
    timerRunning = true
    timerID = self.setTimeout("StartTheTimer()", delay)
    }
    }
    //-->
    </script>
    <script language="JavaScript">
    <!-- Begin
    function openFullscreen(page) {
    var yes = 1;
    var no = 0;
    var menubar = no; // The File, Edit, View Menus
    var scrollbars = no; // Horizontal and vertical scrollbars
    var locationbar = no; // The location box with the site URL
    var directories = no; // the "What's New", "What Cool" links
    var resizable = no; // Can the window be resized?
    var statusbar = no; // Status bar (with "Document: Done")
    var toolbar = no; // Back, Forward, Home, Stop toolbar
    if (navigator.appName == "Microsoft Internet Explorer"){ // better be ie6 at least
    windowprops = "width=" + (screen.width-10) + ",height=" + (screen.height-30) + ",top=0,left=0";
    }
    else { // i.e. if Firefox
    windowprops = "width=" + (screen.width-5) + ",height=" + (screen.height-30) + ",top=0,left=0";
    }
    windowprops += (menubar ? ",menubars" : "") +
    (scrollbars ? ",scrollbars" : "") +
    (locationbar ? ",location" : "") +
    (directories ? ",directories" : "") +
    (resizable ? ",resizable" : "") +
    (statusbar ? ",status" : "") +
    (toolbar ? ",toolbar" : "");
    window.open(page, 'fullPopup', windowprops);
    window.opener = top; // this will close opener in ie only (not Firefox)
    window.close();

    }
    // End -->
    </script>
    </head>

    <body onload="InitializeTimer()">
    <div align="center">
    <center>
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="table1">
    <tr>
    <td width="100%">
    <p align="center"><br>
    <img border="0" src="img/helloani.gif" width="300" height="300"><br>
    </p>
    </td>
    </tr>
    </table>
    </center></div>
    </body>
    </html>

    ********************************

    This is the code for the file called chooser.html:

    <html>
    <head>
    <title>DISPLAY SIZE CHOOSER</title>
    <script>
    function screenres() {
    screenWidth = screen.width;
    screenHeight = screen.height;
    if (screenWidth == 1024 && screenHeight == 768) {
    self.location=('fullscreenpage(1024).html');
    }
    else {
    self.location=('fullscreenpage(800).html');
    }
    }
    </script>
    </head>

    <body onload="screenres()">
    </body>
    </html>

    **************************

    Notice the green bit differences for both browsers (IE and FF).

    Why the timer?

    Because if you load fullscreen this way you get an opening window (opener) that refuses to go away in FF, but will in IE with the trick I've marked in red. (So, it closes a window automatically. Good. It's under my control and I couldn't really give a hoot about it. Some might. Good luck to 'em.)

    In FF, you are left with a boring opener window. My solution is to make an animated graphic(helloani.gif) which dispays a large number countdown to the fullscreen operation (but could say "hello" if you like), however, the final image in the animated graphic says "goodbye and thanks" or whatever. The reason for this is the final image in the animation doesn't kick in (by a timing design when you make the animation) until AFTER the fullscreen happens, but when the user exits fullscreen he sees the goodbye image instead of a boring blank window (the opener) in FF.

    Works for me.

    Terry

  6. #6
    Join Date
    Oct 2005
    Posts
    2
    Is there a simple script to open a browser full screen without all the other stuff?
    Thanks,
    Mike

  7. #7
    Join Date
    Mar 2007
    Posts
    1

    Talking

    Check this boyz :D


    <html>
    <head>
    <title>noTitle</title>
    <script language="JavaScript">
    function pantallaCompleta(pagina) {
    if (navigator.appName == "Microsoft Internet Explorer"){ // better be ie6 at least
    window.open(pagina, '', 'fullscreen=yes, scrollbars=auto, resizable=yes').focus();
    }
    else { // i.e. if Firefox
    window.open(pagina, '', 'width=' + (screen.width-5) + ',height=' + (screen.height-30) + ', scrollbars=auto, resizable=yes, ').focus();
    }
    }
    </script>

    </head>
    <body>
    <a href="javascript:pantallaCompleta('../archivos/ppt/TI_en_la_SEGOB.pps')">Tecnolog&iacute;as de Informaci&oacute;n en la SEGOB</a>
    </body>
    </html>


    Work for me :D
    Enjoy it!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  8. #8
    Join Date
    Feb 2010
    Posts
    1
    try using this function (it's like F11):

    function fullscreen() {
    Width=screen.availWidth;
    Height=screen.availHeight;
    window.open('myPage.html', '',
    'toolbar=no,location=no,directories=no,status=no,menubar=no,'+
    'scrollbars=1,resizable=no,copyhistory=1,width='+Width+','+
    'height='+Height+',top=0,left=0','replace');
    }

  9. #9
    Join Date
    May 2003
    Location
    Between Baltimore and DC
    Posts
    3,579
    Nothing like answering a 5 year old thread
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint] | twitter | linkedin | http://www.pascarello.com

  10. #10
    Join Date
    Jul 2012
    Posts
    2
    Untilnow, there is some solution at
    http://xme.im/display-fullscreen-web...ing-javascript
    or http://stackoverflow.com/questions/9...to-viewer-work

    Code:
    var elem = document.getElementById("myId");  
    if (elem.requestFullScreen) {  
      elem.requestFullScreen();  
    } else if (elem.mozRequestFullScreen) {  
      elem.mozRequestFullScreen();  
    } else if (elem.webkitRequestFullScreen) {  
      elem.webkitRequestFullScreen();  
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles