Hiding the Address Bar of a Browser (Popup)

Open new popup window without address bars in firefox & IE

Firefox 3.0 and higher have disabled setting location by default. resizable and status are also disabled by default. You can verify this by typing `about:config' in your address bar and filtering by "dom". The items of interest are:

  • dom.disable_window_open_feature.location
  • dom.disable_window_open_feature.resizable
  • dom.disable_window_open_feature.status

You can get further information at the Mozilla Developer site. What this basically means, though, is that you won't be able to do what you want to do.

One thing you might want to do (though it won't solve your problem), is put quotes around your window feature parameters, like so:

window.open('/pageaddress.html','winname','directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=350');

Hide the url bar on a pop up window

In Internet Explorer 7 and later, you cannot remove the address bar in Internet Zone windows, for security (anti-spoofing) reasons.

— http://msdn.microsoft.com/en-us/library/ms536651%28VS.85%29.aspx

How to hide address bar using javascript window.open?

(untested)

function openWindow(){
var browser=navigator.appName;
if (browser==”Microsoft Internet Explorer”)
{
window.opener=self;

}
window.open(‘filename.htm','null','width=900,height=750,
toolbar=no,scrollbars=no,location=no,resizable =yes');
window.moveTo(0,0);
window.resizeTo(screen.width,screen.height-100);
self.close();
}

Got this from http://saher42.wordpress.com/2006/08/10/hiding-the-address-bar-on-pageload-using-javascript/.

Hiding Address bar in popup window

Anyway use System.Text.StringBuilder instead of string concatenation.

var sb = new StringBuilder();
sb.Append("<script language=\"javascript\">");
sb.AppendFormat("eval(\"popUpWindow('{0}',0,0,{1},{2},directories=no)\");", url, width, height);
sb.Append("</script>");
lblScript.Text = sb.ToString();


Related Topics



Leave a reply



Submit