Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Location
    Austin, TX
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Controlling Browser Appearance Using JavaScript

    I am trying to use JavaScript to manipulate the appearance of a web browser.
    (1) Initially I need to identify and save the current browser settings (e.g. position, height, width, caption on or off, menubar on or off, border on or off).
    (2) Then I need to change the appearance of the browser to full screen, no border, no caption, no status bar, no menubar).
    (3) Finally, I need to return the browser to the initial settings using the settings saved at the beginning.

    I am a novice at JavaScript and am having a difficult time locating details of the language that permit me to accomplish my objectives.

    John Chapman
    jchapman@onlinecbt.com

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,081
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    JavaScript has no capability to access the client's operating system or the Windows registry, or alter the default behaviour of the browser. No language will allow you to interfere with the user's browser as you propose.

    All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
    Last edited by Philip M; 01-14-2012 at 04:43 PM.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #3
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,981
    Thanks
    56
    Thanked 557 Times in 554 Posts
    you can get details of the user's screen with the screen object and control any window that your code opens (and could be blocked by pop-up blockers) using window.open() but controlling the window that the user opened? No.

  • Users who have thanked xelawho for this post:

    xchapman (01-14-2012)

  • #4
    New to the CF scene
    Join Date
    Jan 2012
    Location
    Austin, TX
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts
    That is not good news to hear that no program permits the change of a browser's appearance.

    If it is not possible to alter the appearance of a browser, then is it possible to open a new browser full screen with everything (i.e. caption bar, menu bar, status bar, browser border) turned off?

  • #5
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,981
    Thanks
    56
    Thanked 557 Times in 554 Posts
    yes - did you look at this link I sent you?
    http://www.w3schools.com/jsref/met_win_open.asp

  • Users who have thanked xelawho for this post:

    xchapman (01-14-2012)

  • #6
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,081
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    Although it is possible, it is a pretty sure way to ensure that any visitor clicks on the red X and never returns to your site.

    What legitimate reason do you have for wanting to do this?

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #7
    New to the CF scene
    Join Date
    Jan 2012
    Location
    Austin, TX
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Almost There

    I'm almost there with the following statement:

    window.open("", "", "fullscreen=yes, location=no, status=no, titlebar=no, toolbar=no, scrollbars=no", "false")

    Using Firefox the name of the browser in a caption appears on the left and on the right are the 3 minimize, /restore/maximize, and close buttons still appear. Can anyone see what I left out or incorrectly set that results in these item to appear at the top of my otherwise blank, full screen?

  • #8
    New to the CF scene
    Join Date
    Jan 2012
    Location
    Austin, TX
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts
    “Although it is possible, it is a pretty sure way to ensure that any visitor clicks on the red X and never returns to your site.

    What legitimate reason do you have for wanting to do this?”


    The browser will not be blank. I will load a full screen application complete with editable text fields. I need to use the entire screen.

  • #9
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,081
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    What legitimate reason do you have for concealing the minimize/restore/close buttons?

    In IE you will lock up the screen so that the user must invoke Task Manager to get away. That is simply vandalism.
    Be aware that all modern browsers block unrequested popups and new windows.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #10
    New to the CF scene
    Join Date
    Jan 2012
    Location
    Austin, TX
    Posts
    5
    Thanks
    2
    Thanked 0 Times in 0 Posts
    You have a valid point. It may be that the top line needs to remain so that the window can be closed in an unplanned error condition.

    For years I have been using an application called ToolBook to launch full screen browser apps. For my apps it has been rare when such an error has occurred. Now I am migrating to Flash Builder. I am unsure of the stability of content produced with that application's performace.

    "Be aware that all modern browsers block unrequested popups and new windows."

    It is common practive for the button that launched the full screen to say "If the full screen window does not appear hold the Ctrl key down and click the button again".
    Last edited by xchapman; 01-14-2012 at 07:29 PM.

  • #11
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Some browsers have completely disabled your ability to turn certain features of new windows off and most browsers give you the ability to specify that all new window requests are to open in a new tab of the existing window. Any requests for how a new window should look are suggestions that are likely to be overridden by most visitors - particularly if you are attempting to stop them doing something with their own browser.


    Attempting to override browser functioning will only drive those using antiquated browsers away from your site as those using modern browsers will not even be aware of your attempt as their browser will have automatically discarded that part of your code.
    Last edited by felgall; 01-14-2012 at 08:50 PM.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

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