# Open Browser Window help

**URL:** <https://discuss.rubyonrails.org/t/open-browser-window-help/11518>\
**Category:** rubyonrails-talk\
**Created:** [April 11, 2007, 3:16am UTC](https://discuss.rubyonrails.org/t/open-browser-window-help/11518 "2007-04-11T03:16:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve3](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@Steve3](https://discuss.rubyonrails.org/u/Steve3)\
**Post date:** [April 11, 2007, 3:16am UTC](https://discuss.rubyonrails.org/t/open-browser-window-help/11518/1 "2007-04-11T03:16:54Z")

</div>

When I previously designed my static sites in dreamweaver, I used an Open Browser Window behavior which opened a URL in a new window of fixed size by inserting the following:

\<a href="javascript:;" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onclick="MM\_openBrWindow('example.html', ... 'width=300,height=300')\</a\>

Is there a simple way to do the same thing in ruby?

---

<div class="post-metadata">

**Author:** ![Chris\_Hall](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@Chris\_Hall](https://discuss.rubyonrails.org/u/Chris_Hall)\
**Post date:** [April 11, 2007, 10:52am UTC](https://discuss.rubyonrails.org/t/open-browser-window-help/11518/2 "2007-04-11T10:52:20Z")

</div>

this has nothing to do with ruby. that function you show is some custom Dreamweaver function. it's just a wrapper for the javascript function window.open().

[http://www.w3schools.com/htmldom/met\_win\_open.asp](http://www.w3schools.com/htmldom/met_win_open.asp)

---

<div class="post-metadata">

**Author:** ![Duplex](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@Duplex](https://discuss.rubyonrails.org/u/Duplex)\
**Post date:** [April 11, 2007, 11:02am UTC](https://discuss.rubyonrails.org/t/open-browser-window-help/11518/3 "2007-04-11T11:02:28Z")

</div>

link\_to "blabla", {:controller =\> some, :action =\> :thing }, :popup =\> ["new\_window\_name","width=300,height=300"]

Rails API on :popup =\> :

:popup =\> true || array of window options: This will force the link to open in a popup window. By passing true, a default browser window will be opened with the URL. You can also specify an array of options that are passed-thru to JavaScripts window.open method.
