Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing IE menu bar and toolbar in html or java ?

Status
Not open for further replies.

godzuki

Programmer
Apr 18, 2002
46
GB
Does anyone know how to remove the IE menu bar and toolbar in html of java so i can incorparate this into my web page.

thanks
 
There is no way of removing browser components for the active window. However, you can through Javascript open a new window without menus and toolbars:
Code:
<a href="[URL unfurl="true"]http://www.google.com"[/URL] target="_blank" title="That search engine" onclick="window.open(this.href,'blank','width=200,height=100,menubar=no,toolbar=no');">Google</a>
For more options, check this page.
 
hi thats great thanks,

what would i have to code to get the window to open automatically from another window without menus's etc?

thanks
 
Just like Vragabond says -no way to remove them from current window.

Have a look at this code:
Code:
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
  <title>Opens self in new window and closes parent</title>
  <script type="text/javascript">
    function mySite() {
      if ((window.name == null) || (window.name == "")) {
        window.open(window.location.href,'myWindow','width=640,height=480,menubar=no,toolbar=no');
        window.close();
      }
    }
  </script>
</head>
<body onload="mySite()">
  <h1>Welcome</h1>
</body>
</html>

It will open "itself" in a new 640 by 480 window w/o menu and toolbars. The only "problem" is that it is asking the user if he/she wants to close the parent window.

Regards


Jakob
 
hey thanks, so how to i open up a new window from say a home page automatically
 
dkdude's code would do that. However, bear in mind that what he did (and what you want) is considered a popup and today they are disabled in most browsers (Geckos, Opera, also IE with certain extensions/toolbars).
 
godzuki

As an alternative approach, Internet Explorer is an automation object and, depending on the language used, it's relatively simple to create an instance of IE and control the object through code.

You can instantiate it without menu bar, toolbar, statusbar etc, and hide/show them as required. The History, Search, Favorites and Channels bars can also be controlled the same way.

The minus is that you would need something like a VB, Delphi, or some other application to control the IE object - the plus is that you would undoubtedly achieve what you are seeking.

FAQ184-2483 - answering getting answered.​
Chris [pc2]
PDFcommander[sup]tm[/sup].net
PDFcommander[sup]tm[/sup].co.uk


 
thanks for that, but if i am applying this method to a web page then it would mean anyone looking at would have to have a vb or delphi etc app running? right?
 
godzuki said:
...would mean anyone looking at would have to have a vb or delphi etc app running?
That's the drawback.


On the other hand, the third party app can have complete control over IE, not only its interface, size, position etc, but even down to providing lists of URLs that the user may visit.



FAQ184-2483 - answering getting answered.​
Chris [pc2]
PDFcommander[sup]tm[/sup].net
PDFcommander[sup]tm[/sup].co.uk


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top