Reputation:
How can I hide the status bar and address bar through JavaScript? I have the following code:
var params = 'width=400, height=400';
params += ', top=0, left=0';
params += ', directories=no';
params += ', location=no';
params += ', menubar=no';
params += ', resizable=no';
params += ', scrollbars=no';
params += ', status=yes';
params += ', toolbar=no';
newwin = window.open('C:\Documents and Settings\Admin\Desktop\test.htm', 'windowname5', params);
In IE8 we can't hack using security option, so how can I achieve this?
Upvotes: 2
Views: 2048
Reputation: 177885
var params = 'width=400,height=400,top=0,left=0';
// you wanted to try to hide the status, then don't include it as =yes
// params += ',status=yes';
newwin = window.open('C:\Documents and Settings\Admin\Desktop\test.htm',
'windowname5', params);
should do the same as your posted code except it would hide the status if allowed
Upvotes: 2
Reputation: 700322
To hide the status bar, change status=yes
to status=no
.
For security reasons, it's not possible to hide the address bar.
Upvotes: 2