Javascript Dialogs and AJAX

I've tried using libraries such as Lightbox, ThickBox, or iBox for
dialogs in my Rails apps (for example, thickbox is at
). They work great for simple stuff, but when I use them to host forms
and try to update divs inside the dialogs, I get weird results.... like
RJS javascript outputs directly to the screen instead of being

Has anyone tried updating dialogs like this? What libraries have you


I've had poor luck using those types of libraries for dialogs. I've
had good luck, on the other hand, with the YUI Dialogs:

It's fairly powerful and quite stable. In general, once you get the
hang of Yahoo's conventions -- and the limitations of the library --
it works very well.

We started to use it for Lingr -- -- but decided that
we couldn't justify forcing that much JS on chatters just for a
sign-in dialog. That's the downside of using YUI: even if you only
want a little, you have to accept a lot.

take a look at DOJO Toolkit.


I used Lightbox (the
version) with rjs quite heavily, while it worked well. You might want to
check if the rjs response comes back with the proper content type.
Normally this is the case, unless your app was developed with an earlier
rails version and you have left set_content_type kind of filter in. A
quick test would be rjs templates without lightboxes.


I'd recommend using prototype-windows. It's advantage is it's based on the prototype library already included with rails.

Dee Zsombor wrote: