0

I am attempting to open an html file in firefox with minimal extras (toolbars, menubars, addressbar, etc). Just the html contents of the webpage, and nothing else. I want to be able to do this within linux from the terminal. I also have to do it in such a way that it works across multiple linux machines running the same version of firefox. So this removes any possibility of using a profile. I was hoping there would be a simple parameter to firefox that would allow me to turn these settings off. I dont believe there is.

The only possibility I have found is through javascript's window.open. It appears the parameter specs to window.open arent even functioning in firefox 1.5.0.9. I have read that some of them were removed in firefox 3.0+, but have not found anything regarding the version I am using, 1.5.0.9.

This is what I am using to open my .html file using windows.open...

test.html:

    <html>
    <body>
    <script>
    window.open('./rel_notes.html','_self','toolbar=no,menubar=no')
    </script>
    </body>
    </html>

And then just running 'firefox test.html' from the terminal.

Both the toolbar and menubar still appear when I do this. What am I doing wrong? Is there a easier way to do this?

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
halexh
  • 3,021
  • 3
  • 19
  • 19
  • there is nothing wrong with your code, firefox is still show the toolbar and menu bar, try on another browser – bungdito Sep 04 '12 at 17:58
  • check this [http://stackoverflow.com/questions/2909645/open-new-popup-window-without-address-bars-in-firefox-ie][1] [1]: http://stackoverflow.com/questions/2909645/open-new-popup-window-without-address-bars-in-firefox-ie – bungdito Sep 04 '12 at 18:01

2 Answers2

0

If your browser settings allow pop-ups without notifications from X source (localhost i presume?) then the following might work:


window.open('./rel_notes.html',null,'menubar=no,toolbar=no');
window.open('','_self',''); //this is needed to prevent IE from asking about closing the window.
setTimeout('self.close();',500);
pkExec
  • 1,752
  • 1
  • 20
  • 39
0

Taken from a link in the link bungdito gave me:

    After a window is opened, JavaScript can't be used to change the features. 

So by opening test.html, and then using window.open on _self, I am trying to adjust features to a window that has already been opened, using javascript.

Source: https://developer.mozilla.org/en-US/docs/DOM/window.open

halexh
  • 3,021
  • 3
  • 19
  • 19