Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I launch a new browser window with no toolbars?

Tags:

html

I want a hyperlink on my main page to launch an HTML help page in a new browser window. However I want the new window to only have an address bar, i.e. not have a menu, toolbars or status bar, and better still not even have an editable address bar.

I have seen this done on quite a few sites but can't figure out what I need to do to launch the new window in that state.

Any clues?

like image 628
Simon Avatar asked Dec 30 '08 15:12

Simon


People also ask

How do I open a browser window without the address bar?

1 Answer. Show activity on this post. window. open(url,'window','toolbar=no, menubar=no, resizable=yes');

How do I open a new browser window?

To open a new window, use a keyboard shortcut: Windows & Linux: Ctrl + n. Mac: ⌘ + n.


1 Answers

To expand a little on what ocdecio has above, you can place the window.open call a function accessed from your various hyperlinks, allowing different links to pop up new windows by passing in a different argument to the function.

<a href="#" onclick="openWindow('faq.html');">FAQ</a>
<a href="#" onclick="openWindow('options.html');">Options</a>

<script language='Javascript'>
<!--
  // Function to open new window containing window_src, 100x400
  function openWindow(window_src)
  {
    window.open(window_src, 'newwindow', config='height=100, width=400, '
        + 'toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, '
        + 'directories=no, status=no');
  }
-->
</script>
like image 72
ConroyP Avatar answered Sep 20 '22 06:09

ConroyP