# Modalbox plugin or similar?

**URL:** <https://www.ruby-forum.com/t/modalbox-plugin-or-similar/119644>\
**Category:** Rails\
**Created:** [November 8, 2007, 9:12pm UTC](https://www.ruby-forum.com/t/modalbox-plugin-or-similar/119644 "2007-11-08T21:12:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarcS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/54ee81/32.png) [@MarcS](https://www.ruby-forum.com/u/MarcS)\
**Post date:** [November 8, 2007, 9:12pm UTC](https://www.ruby-forum.com/t/modalbox-plugin-or-similar/119644/1 "2007-11-08T21:12:09Z")

</div>

Hi,

I’m looking for a rails plugin for modalbox

> **[Wildbit: Building a people-first business | Wildbit](https://wildbit.com/)**
>
> We’re the team behind Postmark, Beanstalk, DMARC Digests, and People-First Jobs. Wildbit is self-funded, profitable, and has been working remotely since 2000.

Has anyone ever done something like that?

Do you know of anything similar? I tried redbox but it seems to have a  
bug which I can’t fix. (the overlay doesn’t cover the full screen  
vertically but only a small part of it)

thanks for your help in advance

Marc

---

<div class="post-metadata">

**Author:** ![MarcS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/54ee81/32.png) [@MarcS](https://www.ruby-forum.com/u/MarcS)\
**Post date:** [November 9, 2007, 12:52pm UTC](https://www.ruby-forum.com/t/modalbox-plugin-or-similar/119644/2 "2007-11-09T12:52:18Z")

</div>

Marc,

I struggled getting Redbox to do a couple of things - one of which was  
the full screen coverage.  
I added a line to the javascript to correct this, but have only tested  
it in the context of my usage which is Firefox only.

Having said that, now I have got Redbox to work, I really like it. It  
is worth looking at the css and javascript, it is not too complex and  
helps to get things working nicely. (I also had to add z-index to my  
autocomplete field to get the dropdown to appear on top of the  
overlay.

Anyway, as far as getting full screen is concerned, you may like to  
what I did in the public/javascript/redBox.jss file:  
In the setOverlaySize function, I aded the notes under APM and the  
simple condition to reset the overlay height

setOverlaySize: function()  
{  
if (window.innerHeight && window.scrollMaxY)  
{  
yScroll = window.innerHeight + window.scrollMaxY;  
}  
else if (document.body.scrollHeight \> document.body.offsetHeight)  
{ // all but Explorer Mac  
yScroll = document.body.scrollHeight;  
}  
else  
{ // Explorer Mac…would also work in Explorer 6 Strict, Mozilla  
and Safari  
yScroll = document.body.offsetHeight;  
}  
// if condition below, added by APM to account for using absolute  
positioning in my content.  
// for some reason, the above calculations don’t give a large enough  
height. It is  
// only the size of the banner.  
// When the scrollbars appear on the window, then all is ok. This is  
because then, the first  
// option innerHeight+scrollMaxY is used. So I just check below if  
the height is not enough  
// then I reset it to window.innerHeight  
if (yScroll \< window.innerHeight)  
{  
yScroll=window.innerHeight //Added by APM  
}

```
$("RB_overlay").style['height'] = yScroll +"px";

```

},

hth  
Tonypm

---

<div class="post-metadata">

**Author:** ![MarcS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/54ee81/32.png) [@MarcS](https://www.ruby-forum.com/u/MarcS)\
**Post date:** [November 9, 2007, 9:34pm UTC](https://www.ruby-forum.com/t/modalbox-plugin-or-similar/119644/3 "2007-11-09T21:34:51Z")

</div>

MarcS wrote:

> Marc
> 
> >

I’m using Control.Modal  
successfully([http://livepipe.net/projects/control\_modal/](http://livepipe.net/projects/control_modal/)). Found it  
lightweight and easy to use.  
HTH  
Chris

## –

Autopendium :: Stuff about old cars  
[http://autopendium.com](http://autopendium.com)
