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 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jan 2004
    Location
    Port Huron, MI, U.S.A.
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Menubar of current window

    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.
    Oh, was I supposed to put something here? ........

  • #2
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!
    Last edited by codegoboom; 12-19-2004 at 05:46 AM. Reason: err
    *this message will self destruct in n-seconds*

  • #3
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    See for yourself: run this JS w/ wscript.exe, & it just might fly...
    Code:
    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;
    }
    *this message will self destruct in n-seconds*

  • #4
    Regular Coder
    Join Date
    Jan 2004
    Location
    Port Huron, MI, U.S.A.
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Oh, was I supposed to put something here? ........

  • #5
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No, you can't be an administrator for someone else on the web.
    *this message will self destruct in n-seconds*


  •  

    Posting Permissions

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