akosch
akosch

Reputation: 4396

How do I hide the navigation bar for popups in javascript?

How do I hide the navigation bar for popups in javascript?

Upvotes: 2

Views: 9799

Answers (3)

epascarello
epascarello

Reputation: 207511

With modern day browsers, there are settings that will not allow you to hide the location and toolbars. There is no way around the browser security settings so setting the location=0 may not work.

Upvotes: 3

Gilimanjaro
Gilimanjaro

Reputation: 391

The above suggestion should work under most circumstances.

Beware of using pop-up's at all though; they may be inhibited by the browser, or the visitor may have set their browser to open new windows in tabs instead, causing unexpected results (especially if their tabs are opening in the background).

Depending on your purpose, you may want to consider using jQuery's dialog() instead.

Upvotes: 4

Joel
Joel

Reputation: 19358

window.open("http://www.google.com", "mywindow", "location=0,toolbar=0");

See this site for more attributes.

Upvotes: 5

Related Questions