How to Remove Address Bar in Firefox Using Javascript
Javascript is a client-side language that uses commands to control the layout of a web browser window. One common use for Javascript is a popup window that provides users with an ad or a new window. In many cases, the web developer does not want the address bar to show, giving the user a clear window that displays an ad without unnecessary controls. This can be done using the \"window.open()\" function and necessary parameters.
Instructions
-
-
1
Open your web project in an HTML editor. You can use an application as simple as Notepad or more advanced applications like Notepad++ and Visual Studio.
-
2
Create a Javascript script block underneath the <head> tag. All the code created for the popup windows should be placed within this tag. The script block code is below:<br /><script type=\"text/javascript\"> </script>
-
-
3
Create the window.open function. The following code opens a window for your readers and eliminates the address bar:<br />window.open(\"myHTMLFile.htm\",null,\"height=200,width=400,status=yes,toolbar=no,menubar=no,location=no\")<br />GO<br />The \"myHTMLFile.htm\" parameter is the file that loads into the window. You can also control the height and width of the window, to make it stand out more for the user. The \"location=no\" parameter is what hides the address bar from the user. Status, menubar and toolbar are also optional parts of the window that you can control.
-
4
Save the file and open it with a web browser to test your new code. When you open the page, a new window pops up with no address bar.
-
1
Tips & Warnings
You can place this code in a Javascript function to pop up a window only when the user clicks a button or link on your web page.
References
Comments
-
member1722
Jul 18, 2010
I'm using FF 3.5. The address bar is still enable.