BrilliantBrains
BrilliantBrains

Reputation: 91

Javascript open a new browser window (not tab) with address bar disabled

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

Answers (2)

The Alpha
The Alpha

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

Shylo Hana
Shylo Hana

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

Related Questions