Help w/ hiding explorer bars with Jscript

Hi,

I'm trying to hide the explorer bars, I occasionally see them when a page is launched in kiosk mode.

I call the script first thing when the page is loading. When I call the script function, I still see the explorer bars.

Is this script correct I'm I running the script at at the correct time

function fn_HideBrowserBars() {
var
objShell = new ActiveXObject("Shell.Application");
// Favorites
objShell.ShowBrowserBar("{EFA24E61-B078-11d0-89E4-00C04FC9E26E}", false);
// folders
objShell.ShowBrowserBar("{EFA24E64-B078-11d0-89E4-00C04FC9E26E}", false);
// History
objShell.ShowBrowserBar("{EFA24E62-B078-11d0-89E4-00C04FC9E26E}", false);
// Search
objShell.ShowBrowserBar("{30D02401-6A81-11d0-8274-00C04FD5AE38}", false);
}

Thanks..



Answer this question

Help w/ hiding explorer bars with Jscript

  • John123

    Where is the page running from Does it have permission to create the Shell.Application object
  • LeanneDinh

    Thanks for replying..

    I'm calling the function in the body tag:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <
    html>
    <
    head>
    <
    meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><meta http-equiv="imagetoolbar" content="no">
    <
    title>Trans </title>
    <
    script src="SWFObject.js" type="text/javascript"></script><script src="browserhooks.js" type="text/javascript"></script>
    </
    head>
    <
    script>
    function fn_HideBrowserBars() {
    var
    objShell = new ActiveXObject("Shell.Application");
    // Favorites
    objShell.ShowBrowserBar("{EFA24E61-B078-11d0-89E4-00C04FC9E26E}", false);
    // folders
    objShell.ShowBrowserBar("{EFA24E64-B078-11d0-89E4-00C04FC9E26E}", false);
    // History
    objShell.ShowBrowserBar("{EFA24E62-B078-11d0-89E4-00C04FC9E26E}", false);
    // Search
    objShell.ShowBrowserBar("{30D02401-6A81-11d0-8274-00C04FD5AE38}", false);
    }
    </script>
    <
    body onload="fn_HideBrowserBars()">
    </
    div>
    <
    div id="flashcontent">
    Trans did not launch.
    </div>
    <
    script type="text/javascript">
    fn_launchMovie("flashcontent");
    </script>
    </
    body>
    </
    html>

    Yup, your right it is a permissions problem on the first ShowBrowserBar command. I restarted the browser with the debugger enabled and it pops right up with a "permissions denied" error. When I reload the page the error doesn't display. 

    I have the web page in IE's "trusted" list, I also tried the "local"  list, same problem. The first command in the function closes the favorites bar, I make sure the favorites bar is opened in case it doesn't know what I talking about, no change.

    In this page I'm loading a flash application, I removed all the other stuff, but again there is no difference "Permission denied".

    I moved to W2K and EI6 the same thing happens. I know I missing something obvious.

    Any suggestions

    -thnks

     

     


  • Help w/ hiding explorer bars with Jscript