Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

javascript

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.

like image 677
BrilliantBrains Avatar asked Feb 19 '26 15:02

BrilliantBrains


1 Answers

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.

like image 78
The Alpha Avatar answered Feb 23 '26 19:02

The Alpha