How can I hide the address bar in a modal dialog?
How can I hide the address bar (location bar ) in a modal dialog? Here is my code:
var dialo开发者_JAVA百科gFeatures = '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);
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.
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
.
You can't.
Hiding the address bar is disallowed in most browsers, for security reasons.
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
精彩评论