Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to hide addressbar and toolbar of IE using Javascript?

 
Rose Francis
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could anyone tell how to hide the addressbar and toolbar of the current browser window(IE) using javascript. I am able to do it for new window using window.open().
 
jeff rusty
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the below Link can give you a clear idea of the attributes and values of Window.open();
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/open_0.asp

To Hide the AddressBar :
window.open("Sample.htm",null,
"height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
premnath,
Rose said "Current window" and they could do it with the "window.open()"!

Rose,
You can not remove toolbars from the current window. Only way is through a pop up window.

Eric
 
Rose Francis
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you verymuch Premnath and Eric. As Eric said I was able to do it using window.open already. But the popup blocker was the one which I prefered to get rid off and also it was better if I could do it with the current window. When I try to close the parent window after opening the popup, both windows are getting closed sometimes. And also I am not able to maximise the new window.

The code I tried is,

window.opener=self;

window.open('b.html','null','width=1000,height=750,top=0,left=0,toolbar=no,scrollbars=yes,location=no,resizable=yes');

window.resizeTo(screen.width,screen.height);

self.close();

Could anyone suggest a solution?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rose Francis:
When I try to close the parent window after opening the popup


How unfriendly.

Could anyone suggest a solution?


What is it you are really trying to accomplish? Aside from annoying your users.
[ November 15, 2006: Message edited by: Bear Bibeault ]
 
Rose Francis
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all my friends,

I am extremely sorry for that.

Bear Bibeault, Thank you very much for pointing it out.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rose and prem,
Welcome to JavaRanch!

We're pleased to have you here with us in the HTML/Javascript forum, but there
are a few rules that need to be followed, and one is that proper names are
required. Please take a look at the
JavaRanch Naming Policy and
adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

You can change it here
 
Rose Francis
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have corrected the display name.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic