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

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

+5
source share
4 answers

(unverified)

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();
}

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

+5
source

locationis the window function that you want to set to noor 0to hide the address bar.

: , , , , , ! - jQuery UI Dialog.

:

window.open( " http://www.mydomain.com/mypage.htm", "mywindow", " location = 0, menubar = 0, = 0, = 0, = 100, = 100" );

window.open([Url] [, Name] [, Features] [, History])

,

  • .
  • . , "" "".
  • , URL.
  • resizable / .
  • . ,
  • . (: height = 350 ')
  • .
+13

You also need to enable window.open to hide the address bar in Firefox, which is disabled by default. Go to about:config, find disable_window_open, so that you can see all the options for disabling the window.open function , including which is responsible for the fact that the address bar is not hidden. Set it to . dom.disable_window_open_feature.locationfalse

0
source

Enter the address bar of Firefox, for example: config,

find disable_window_open so you can see all window.open functions

0
source

All Articles