JavaScript - Opening a new window with little to no chrome

This post is more than 2 years old.

This is an old question, covered in hundreds of FAQs, but a reader asked me this today and I'm nothing if not responsive. (Especially when I know the answer. ;) The question was - how do you open a new window in JavaScript with as little chrome as possible. JavaScript makes this rather simple. The syntax to open a new window is:

foo =, varname, features);

Where features is a list of ... well, features. This includes chrome, size, and other options. I found a good list here.

So to answer the question - you can simply disable all the features that are chrome related like so:

<script> function popup() { var features = 'directories=no,menubar=no,status=no,titlebar=no,toolbar=no,width=500,height=500'; var mypopup ='', 'mypopup', features); } </script>

<form> <input type="button" onclick="popup()" value="Click me, baby"> </form>

In my features list I disabled directories, menubar, status, titlebar, and toolbar. Note though that status=no will not work in Firefox or IE7, due to security settings, which is probably a good thing.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate for HERE Technologies. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA