# Modal Box

**URL:** <https://www.ruby-forum.com/t/modal-box/129916>\
**Category:** Rails\
**Created:** [February 22, 2008, 5:37pm UTC](https://www.ruby-forum.com/t/modal-box/129916 "2008-02-22T17:37:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@johnk](https://www.ruby-forum.com/u/johnk)\
**Post date:** [February 22, 2008, 5:37pm UTC](https://www.ruby-forum.com/t/modal-box/129916/1 "2008-02-22T17:37:23Z")

</div>

I am looking for the best way to create modal boxes in my RubyOnRails  
app.

What I am looking for:

- a box that does not close when you click outside of the box
- a box that does not darken out everything outside of the box
- a box that I can put a form in
- works on IE6+, Firefox, Safari

And if it nicely integrated with Rails even better.

What are people using? 🙂

–  
John K.  
removed\_email\_address@domain.invalid

Blog: [http://www.kopanas.com](http://www.kopanas.com)  
Conference: [http://www.cusec.net](http://www.cusec.net)  
Twits: [http://www.twitter.com/kopanas](http://www.twitter.com/kopanas)

---

<div class="post-metadata">

**Author:** ![johnk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@johnk](https://www.ruby-forum.com/u/johnk)\
**Post date:** [February 22, 2008, 7:44pm UTC](https://www.ruby-forum.com/t/modal-box/129916/2 "2008-02-22T19:44:48Z")

</div>

On 22 Feb 2008, at 17:36, John K. wrote:

> What are people using? 🙂

[http://prototype-window.xilinus.com/](http://prototype-window.xilinus.com/)

You’ll have to write your own rails helper, which shouldn’t be too hard.

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![johnk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@johnk](https://www.ruby-forum.com/u/johnk)\
**Post date:** [February 23, 2008, 1:02am UTC](https://www.ruby-forum.com/t/modal-box/129916/3 "2008-02-23T01:02:25Z")

</div>

We use Control.Modal, which is based on Prototype and can easily be  
configure for 1 & 2 and works fine with forms (e.g. login form on  
[http://autopendium.com](http://autopendium.com)).

Re, integration with Rails, I’m not the best person to comment (though  
the Prototype integration gives it a smaller footprint than if it was  
stand-alone), as we use it unobtrusively with behaviours attached via  
LowPro.

[http://livepipe.net/projects/control\_modal/](http://livepipe.net/projects/control_modal/)  
[http://www.danwebb.net/2006/9/3/low-pro-unobtrusive-scripting-for-prototype](http://www.danwebb.net/2006/9/3/low-pro-unobtrusive-scripting-for-prototype)

HTH  
Chris

John K. wrote:

> What are people using? 🙂
> 
> –  
> John K.  
> removed\_email\_address@domain.invalid [mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
> 
> Blog: [http://www.kopanas.com](http://www.kopanas.com)  
> Conference: [http://www.cusec.net](http://www.cusec.net)  
> Twits: [http://www.twitter.com/kopanas](http://www.twitter.com/kopanas)
> 
> >

## –

[http://pushrod.wordpress.com](http://pushrod.wordpress.com) – old dogs, new tricks  
[http://autopendium.com](http://autopendium.com) – a place your old car can call home
