Use javascript to remove/hide browser address bar or toolbar on the fly

Does any body know of a way using JavaScript to remove or hide a browser's address bar or toolbar on the fly? You can obviously use a script to pop open a new window and set the properties of that window like so:,window_handle,"toolbar=no,location=no,status=no,menubar=no,scrollbars=no");

However, I want a way to get rid of the menubar and toolbar on the click of a button, lets say. In other words, the pop up window has already been opened, displaying the menubar and tool bar. When the user clicks on a button or link in the window, though, the menubar/tool bar should disappear. Any ideas? Thanks!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

no way
You can only do this when opening a new window, at the time the new window is opened, not later.
Wow that took a long time to edit.  Here's a mimic version that should create the desired effect:

<script type='text/javascript'>
  if( != "")  {
    obj ='?') + 1)
    address = (obj=="true") ? true : false ;
  } else {

  function toggleAddress(isvis)  {

    add = (address) ? "no" : "yes" ;

    if(isvis != "")  {
      add = isvis
    q = (add=="yes") ? false : true ;
    if(q) {
    } else {
    }"test5.html?" + address,"", "toolbar=" + add + ",location=" + add + ",status=" + add + "menubar=" + add +

"scrollbars=" + add);

    self.opener = ""

<a onClick='toggleAddress("")'>Toggle</a>||<a onClick='toggleAddress("yes")'>With Address</a>||<a onClick='toggleAddress("no")'>No Address</a>


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Well, it works -- however, just so you know, it does so by reloading the popup window.
Like I said, it mimics the effect, because what luoshiben is asking for can't be done normally.  It's just a way around the limits :-)

I figured you knew that, Slam -- my remark was addressed to the original poster. :D
luoshibenAuthor Commented:
Thanks superslamwich- I couldn't think of a way to do it either without reloading the window, but your solution is a bit more efficient than what I would have done.
Happy to help :-)

When i use this I just get
Toggle||With Address||No Address
in the same window.  What am i missing?
Nothing, just click on whichever you want and it will switch.  I know I didn't make them links, I should have, but just click on them and they'll work

I am a noob in javascript and I dont understand how to integrate this script. can you give me a full script? if it is possible copy/past mode will be great
Hi, its also works with IE7'some.html?',null,'toolbar=no,scrollbars=no,location=no,resizable =no,width=625,height=550,left=225,top=120');

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.