luoshiben
asked on
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.open(URL_of_new_win dow,window _handle,"t oolbar=no, location=n o,status=n o,menubar= no,scrollb ars=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!
window.open(URL_of_new_win
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!
no way
You can only do this when opening a new window, at the time the new window is opened, not later.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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 :-)
{Slam}
{Slam}
I figured you knew that, Slam -- my remark was addressed to the original poster. :D
ASKER
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 :-)
{Slam}
{Slam}
When i use this I just get
Toggle||With Address||No Address
in the same window. What am i missing?
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
{Slam}
{Slam}
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
window.open('some.html?',n ull,'toolb ar=no,scro llbars=no, location=n o,resizabl e =no,width=625,height=550,l eft=225,to p=120');
thanks
window.open('some.html?',n
thanks