VolleyBall Player VolleyBall Player - 5 months ago 315
Javascript Question

How to hide address bar in Firefox using javascript window.open

I want to disable the address bar in Firefox using javascript window.open. Also the script should work in IE, Safari and chrome. Any suggestions.

Answer

(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/.

Comments