0

I need to Hide address bar in Pop up window(Security reasons). i used

window.open(“res.html”,“mywindow”,location=0,menubar=0,status=0,scrollbars=0,width=100,height100″);

in my JavaScript Which is working fine. But, for mozilla we need to set Dom.disable_window_open_feature.location value.

In Web application how can i set this in users firfox browser? Is there any way to set this using java script. I want setDom.disable_window_open_feature.location value using JavaScript before i use window.open. How can i do this?

1 Answer 1

0

You can't hide it, and even if you could, this would almost certainly provide no security for your application as it could be simply overridden.

The reason any up to date browser will not allow you to hide the address bar, is actually for security/anti-phishing reasons itself. If the address bar was hidden, and you included a popup window (for example to a bank's customer page), and you made a site that looked like the banks login page to capture their customers details. Since the address bar is forced to always be shown, the end user would instantly see the domain was not from their bank.

If you give some more information as to why you have a security requirement to hide the address bar, maybe we can provide an alternative method to help you.

Intelekshual gives a good explanation in the post here, but note this will only work for your local machine, and not other web users:

Firefox 3.0 and higher have disabled setting location by default. resizable and status are also disabled by default. You can verify this by typing `about:config' in your address bar and filtering by "dom". The items of interest are:

  • dom.disable_window_open_feature.location

  • dom.disable_window_open_feature.resizable

  • dom.disable_window_open_feature.status

Also have a look at the Mozilla documentation for window.open to get the official information.

In Firefox 3, dom.disable_window_open_feature.location now defaults to true, forcing the presence of the Location Bar much like in IE7. See bug 337344 for more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.