Reputation: 91
Is it possible to open a new browser window (not tab) with the help of javascript. additionally i want to disable or hide address bar.
Upvotes: 3
Views: 8504
Reputation: 146201
Yes, you can open a new popup window with address bar disabled (url can't be changed)
HTML:
<input type="button" value="Open Window" onclick="return popitup('http://heera.it')" />
JS
function popitup(url) {
newwindow=window.open(url,'name','height=300,width=300, location=0');
if (window.focus) {newwindow.focus()}
return false;
}
See the location=0
but not consistent in all browsers.
DEMO.
Upvotes: 7
Reputation: 1870
It depends on the client. The Firefox builds I've used over the last 10 years have all had the ability for the page to hide the address bar disabled. Pretty sure you can't do anything about it.
Upvotes: 3