SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hide the browser address bar

    I want to hide the browser address bar when open a new window. I can hide menu bar, status bar, etc except address bar.

    Can any one help me please.

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,196
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    I did a little bit of searching around an apparently this code works

    Code JavaScript:
    var win = null;
     
    function NewWindow(mypage,myname,w,h,scroll,pos){
        if (pos == "random"){
            LeftPosition = (screen.width) ? Math.floor(Math.random()*(screen.width-w)) : 100;
            TopPosition = (screen.height) ? Math.floor(Math.random()*((screen.height-h)-75)) : 100;
        }
     
        if (pos == "center"){
            LeftPosition = (screen.width) ? (screen.width-w)/2 : 100;
            TopPosition = (screen.height) ? (screen.height-h)/2 : 100;
        } else if ((pos != "center" && pos != "random") || pos == null){
            LeftPosition = 0;
            TopPosition = 20;
        }
     
        settings = 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
        win = window.open(mypage,myname,settings);
    }

  3. #3
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply.

    I tried this code. But the address bar where the page url is displaying, is still there.

    I am trying to load a web page in Iphone mobile browser. I want the page to be occupied the full screen equivalent to the screen when we press F11.

    Please help me.

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by sahayamary View Post
    Thanks for the reply.

    I tried this code. But the address bar where the page url is displaying, is still there.

    I am trying to load a web page in Iphone mobile browser. I want the page to be occupied the full screen equivalent to the screen when we press F11.
    Modern web browsers prevent that type of behavior from being scripted, to protect users from websites trying to mislead them.

    In other words, you are not allowed to hide the address bar now. It might be possible to allow it individually by customizing an individual browser's settings, but not otherwise.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,880
    Mentioned
    74 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by sahayamary View Post
    Thanks for the reply.

    I tried this code. But the address bar where the page url is displaying, is still there.

    I am trying to load a web page in Iphone mobile browser. I want the page to be occupied the full screen equivalent to the screen when we press F11.

    Please help me.
    I Google on your behalf and discovered:

    http://www.quirksmode.org/js/popup.html



    It is buggy in Firefox and Opera.
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Wolfshade on earning Member of the Month for August 2014

  6. #6
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pmw57 View Post
    Modern web browsers prevent that type of behavior from being scripted, to protect users from websites trying to mislead them.

    In other words, you are not allowed to hide the address bar now. It might be possible to allow it individually by customizing an individual browser's settings, but not otherwise.
    Thanks for the reply.


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
  •