SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Open current window in full screen mode

    How could i open a current web page in full screen mode(automatically when its loaded)?

    <script type="text/javascript">


    window.open( "target.html", "myWindow", "fullscreen=1,titlebar=no,resizable=no")


    </script>

    But,the above script opens in new window.

    any suggestions please.

    Thank you.

  2. #2
    We're from teh basements.
    Join Date
    Apr 2007
    Posts
    1,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    window.onload = function() {window.resizeTo(screen.width,screen.height);}

  3. #3
    We're from teh basements.
    Join Date
    Apr 2007
    Posts
    1,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To account for the window chrome (title bar, status bar, etc.), you will need to make the window slightly larger than the screen size and move it slightly to the left and upward.

    Screen object properties and methods: http://www.javascriptkit.com/jsref/screen.shtml
    Window object properties and methods: http://www.javascriptkit.com/jsref/window.shtml

  4. #4
    SitePoint Addict
    Join Date
    Mar 2003
    Location
    In a house in the USA
    Posts
    293
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure if this is the solution you are looking for but if this is going to be used for a kiosk you could open Internet Explorer in kiosk mode using the -k option. Like opening run and type: iexplore -k If you want something like this in firefox there are kiosk plugins available.
    Daniel
    http://www.wlscripting.com - PHP Tutorials and code snippets
    Notepad++ Function List plugin tip - for PHP developers

  5. #5
    We're from teh basements.
    Join Date
    Apr 2007
    Posts
    1,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by WLHosting View Post
    Not sure if this is the solution you are looking for but if this is going to be used for a kiosk you could open Internet Explorer in kiosk mode using the -k option. Like opening run and type: iexplore -k If you want something like this in firefox there are kiosk plugins available.
    I think the OP wants to control visitors' browsers, not his own. So command line options and plugins won't help.

    A further caution about resizing the current window. These techniques are commonly used in "browser bombs", which are Web pages designed to frustrate and annoy the user. They often either crash the browser or force the user to kill it from the task list. Consequently, any sudden, unwanted changes in browser window position or size will likely be viewed with suspicion by many users. I recommend not relying on fullscreen mode or any emulation thereof in your pages.

    Moreover, you can't know for sure how many toolbars a given user may have enabled. Therefore, there is no way to accurately determine how many pixels the window must be moved or resized by.

  6. #6
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you so much

  7. #7
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,784
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Just remember that most browsers will ignore that request since they display pages the way that their owner has requested and not the way that one of the many sites open in the browser at the same time wants it.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

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