faqts : Computers : Programming : Languages : JavaScript : Windows

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

222 of 334 people (66%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

How to hide the menubar/toolbar/locationbar/statusbar of an existing window?

Oct 4th, 2000 06:53
Martin Honnen,


It seems that NN4 allows that by calling
  open('', '_top', 'featureString')
e.g. to hide the menubar and the toolbar but show the statusbar and the 
locationbar:
  open('', '_top', 'status=1,location=1,menubar=0,toolbar=0');

Also in NN4 with trusted script you can do:
  netscape.security.PrivilegeManager.enablePrivilege
('UniversalBrowserWrite');
  window.menubar.visible = false;
  window.toolbar.visible = false;
  window.locationbar.visible = false;
  window.statusbar.visible = false;

You can also check whether a bar is visible with e.g.
  if (window.menubar.visible)
and of course you can show the components again if needed
  netscape.security.PrivilegeManager.enablePrivilege
('UniversalBrowserWrite');
  window.menubar.visible = true;
  window.toolbar.visible = true;
  window.locationbar.visible = true;
  window.statusbar.visible = true;

For IE4+ you need a signed active x control like wpm of 
http://www.meadroid.com which provides an api to change such window 
properties.