# Open Browser Window help

**URL:** <https://www.ruby-forum.com/t/open-browser-window-help/91647>\
**Category:** Rails\
**Created:** [April 11, 2007, 5:17am UTC](https://www.ruby-forum.com/t/open-browser-window-help/91647 "2007-04-11T05:17:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://www.ruby-forum.com/u/steve)\
**Post date:** [April 11, 2007, 5:17am UTC](https://www.ruby-forum.com/t/open-browser-window-help/91647/1 "2007-04-11T05:17:42Z")

</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:;”  
onclick="MM\_openBrWindow(‘example.html’, …  
‘width=300,height=300’)

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

---

<div class="post-metadata">

**Author:** ![steve](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://www.ruby-forum.com/u/steve)\
**Post date:** [April 11, 2007, 12:53pm UTC](https://www.ruby-forum.com/t/open-browser-window-help/91647/2 "2007-04-11T12:53:37Z")

</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:** ![steve](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://www.ruby-forum.com/u/steve)\
**Post date:** [April 11, 2007, 1:03pm UTC](https://www.ruby-forum.com/t/open-browser-window-help/91647/3 "2007-04-11T13:03:40Z")

</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.
