PDA

View Full Version : I can't get window.open to get rid of address bar.



GIDMEISTER
11-27-2012, 09:42 PM
I have the following code:
var strAttribs = 'location=0,width=500,height=500,fullscreen=0,toolbar=0,status=0,menubar=0,titlebar=0,scrollbars=1,c opyhistory=0,resizable=0';

var mywin = window.open("vidseg.aspx?helpstr=" + sPage, 'HelpWindow', strAttribs);
mywin.moveTo(60, 60);
The window does open, but it has an address bar, with a url shown in it. I thought "location=0" would get rid of that, but it did not.
Any help is appreciated.

Philip M
11-27-2012, 09:59 PM
I have the following code:
var strAttribs = 'location=0,width=500,height=500,fullscreen=0,toolbar=0,status=0,menubar=0,titlebar=0,scrollbars=1,c opyhistory=0,resizable=0';

var mywin = window.open("vidseg.aspx?helpstr=" + sPage, 'HelpWindow', strAttribs);
mywin.moveTo(60, 60);
The window does open, but it has an address bar, with a url shown in it. I thought "location=0" would get rid of that, but it did not.
Any help is appreciated.

That is a security measure. You cannot suppress the address bar.

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

felgall
11-27-2012, 10:30 PM
Those browsers that will allow you to get rid of the address bar so that a new address cannot be entered will generally display the current page address somewhere else in the new window instead.

rnd me
11-28-2012, 06:59 PM
for reduced chrome, you can use showModalDialog() instead, but even that usually has a url bar for security reasons.

using a modal dialog package instead often provides a better user experience due to popup performance and blockers and by simply staying on the same tab through the site visit lifetime.