Narazana
Narazana

Reputation: 1950

Disable Location Bar of Browsers in Pop-up Windows

I have the following HTML with Javascript:

<A HREF="javascript:void(0)"onclick="window.open('http://www.msn.com/','New Windows','height=380, width=300,location=no')">Hide Address Bar</a>

It's working fine with IE but not FireFox 3 and later.

I want to disable the "Location" bar when pop-up windows shows up.

Upvotes: 5

Views: 10555

Answers (2)

Kranu
Kranu

Reputation: 2565

The problem is not an error in your syntax. The problem is security concerns. If people could hide the address bar, people would be able to recreate login pages such as Paypal and people would be tricked into logging into them and giving a malicious hacker their password.

As a result, most of the latest browsers disable hiding the location bar, although in some browsers, setting location=no will disable the address bar from being modified.

Upvotes: 8

Quentin
Quentin

Reputation: 944556

Modern browsers do not allow you to hide the address bar (as an anti-phishing measure). There should be no way around this.

Upvotes: 4

Related Questions