...

View Full Version : Menubar of current window



Bobo
12-19-2004, 05:14 AM
How do you make the menubar of the window you're currently in go away?
I found something like window.MenuBar=false or window.MenuBar(false) but those methods dodn't work. 'window' might have been 'InternetExplorer' instead, but that woudn't make sense.

codegoboom
12-19-2004, 05:35 AM
It can work by passing a reference for the InternetExplorer object into the document hosted by the object, if the object is initialized from a script or HTA... how about that! :D

codegoboom
12-19-2004, 07:35 AM
See for yourself: run this JS w/ wscript.exe, & it just might fly... ;)

with(WScript)
{
var obj = CreateObject("InternetExplorer.Application");
obj.Navigate("about:blank");
var doc = obj.document;
var win = doc.parentWindow;
var txt = "<script>var IE;<\/script>" +
"<button onclick=\"IE.MenuBar = !IE.MenuBar\">" +
"Toggle MenuBar<\/button>";
doc.write(txt);
win.IE = obj;
obj.visible = 1;
}

Bobo
12-19-2004, 05:38 PM
COOL!
Is there any way I can incorporate that into a .html file on the web?
I gotta use that script (or one like it) in an online page.

codegoboom
12-19-2004, 06:39 PM
No, you can't be an administrator for someone else on the web. :p



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum