Reputation: 73
How can I hide the address bar (location bar ) in a modal dialog? Here is my code:
var dialogFeatures = 'center:yes; dialogWidth:600px; location:no;dialogHeight:400px; edge:raised; help:no; resizable:no; scroll:no; status:no; statusbar:no; toolbar:no; menubar:no; addressbar:no; titlebar:no;';
newwindow2 = window.showModalDialog('Combo?start1=' + calEvent.start + '&end1=' + calEvent.end + '&ownerType=' + < %= ApplicationConstants.OWNER_TYPE_CALENDAR % > , 'app', dialogFeatures);
Upvotes: 0
Views: 19076
Reputation: 21
in about:config change this parameter:
dom.disable_window_open_feature.location
and for menubar and any other components you have to change their feature in about:config
Upvotes: -1
Reputation: 700910
You can't.
Hiding the address bar is disallowed in most browsers, for security reasons.
Upvotes: 1
Reputation: 449843
It's not possible. The address bar is a security feature in most browsers, in IE since version 7, in Firefox (I think) since version 2.
Upvotes: 7
Reputation: 344803
You can't hide the address bar, location: no
is not a valid option for the features
argument.
In Internet Explorer 7 and later, all windows opened by the browser have an address bar. The same is true of Google Chrome and other browsers supporting showModalDialog
.
Upvotes: 2