Reputation: 517
Is it possible to hide the user's address bar in the browser? If so, how would I go about it?
Upvotes: 0
Views: 11996
Reputation: 42099
You can create a modeless window (IE), but you cannot hijack the browser's current page.
FF does not support this as it took them 3 years to implement the showModalDiaglog, which was more secure than IE's implementation.
Your option is to:
Upvotes: 1
Reputation: 92274
Can't do it reliably and it's not a good idea, even for popups, I think currently, IE is the only one that will hide it. Otherwise the user doesn't know where the popup is from. Think about the facebook login popup. How am I supposed to be confident that I'm not entering my password into a malicious website?
Upvotes: 1
Reputation: 16752
I don't think you can hide the address bar on a user's current window but you can create a pop up that has the address bar hidden:
var popup = window.open("http://someurl", "myPopup", 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=120,height=120')
Upvotes: 4