Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 733
Narazana Avatar asked Aug 27 '10 06:08

Narazana


1 Answers

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.

like image 178
Kranu Avatar answered Nov 03 '22 02:11

Kranu