not to show menubar,addressbar & etc of browser without any security confirm

Discussion in 'Javascript' started by lale.kat@gmail.com, Nov 13, 2007.

  1. Guest

    I want my Browser not to show menubar,addressbar,toolbar and etc. when
    the first page of my site become loaded.
    I use this code for it:
    -------------------------------------
    <html>
    <head>
    <title>Haniye</title>

    <script type='text/javascript'>
    <!--
    function SetWindow_Browser()
    {

    var height = 700 //Set height
    var width = 700 //Set width
    var name = "winname" //Set window name
    var top = 20 //Set distance from top
    var left = 20 //Set distance from left

    //script revision by A. Kuehler, XombieRx
    if(navigator.appName == "Netscape") //start handling for Netsacpe
    and Mozilla
    {

    netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite")
    window.menubar.visible = false;
    window.locationbar.visible = false;
    window.scrollbars.visible = false;
    window.personalbar.visible = false;
    window.statusbar.visible = false;
    window.toolbar.visible = false;

    netscape.security.PrivilegeManager.revertPrivilege("UniversalBrowserWrite")
    resizeTo(width,height); //replace with actual numerical values
    }//end if handling for Netscape/Mozilla

    else
    { //for all other browers
    //script provided by superslamwich
    if(document.location.search=='')
    {
    window.open(document.location + "?
    newwin=true",name,"fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,location=no,width="
    + width + ",height=" + height + ",left=" + left + ",top=" + top);
    self.opener=""
    self.close()
    }
    else
    {
    window.opener.close();
    }
    }//end handling for all other browsers
    }
    -->

    </script>



    <BODY onload="SetWindow_Browser();">
    </body>
    </html>
    -----------------------------------------------------------------------------
    when I use this code in Mozilla firefox ,It opens dialog confirm, with
    this title:"internet security" and with this text:"A script "file://"
    is requesting enhanced abilites UNSAFE and could be used compromise
    your mashine or data"
    & ask me to allow or deny it.
    if I push allow botton It will works but I don't want to show this
    dialog ,I wanna do it directly without any question.
    how could I do it?Is it possible?and do u know another way to hidden
    menubar,toolbar,ect?
    and also when I use this code in Internet Explorer it appears menu at
    the top of Browser 's window with this content:
    "to help protect your security ,Internet Exlprer has restricted this
    file from showing active content that could access your computer click
    here
    for option" and when I seclect "allow blocked content",It will does
    something that I want.but I don't want to show this menu too.thx
     
    , Nov 13, 2007
    #1
    1. Advertising

  2. Evertjan. Guest

    ?? wrote on 13 nov 2007 in comp.lang.javascript:

    > I want my Browser not to show menubar,addressbar,toolbar and etc. when
    > the first page of my site become loaded.


    Clientside Javascript cannot and should not be able to do that.

    If you want to change the security settings of "Your Browser",
    so be it, but it has nothing to do with the abilities of clientside
    javascript.

    And why would you compromize the security of "Your Browser" anyway?

    [btw, for IE look at .hta file behavour.]

    So it is OT in this NG, methinks.

    [please use a signature on usenet]

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Nov 13, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Just D.
    Replies:
    9
    Views:
    10,836
    majiswala
    Jun 22, 2007
  2. Noozer
    Replies:
    1
    Views:
    5,528
    Roy Schestowitz
    Mar 22, 2006
  3. Replies:
    1
    Views:
    6,116
    Andrew T.
    Jul 10, 2006
  4. Lucky
    Replies:
    2
    Views:
    327
    Lucky
    Jan 10, 2007
  5. Replies:
    1
    Views:
    119
    Gregor Kofler
    Nov 13, 2007
Loading...

Share This Page