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

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

Thanks,
phil

On 8/22/06, [email protected] [email protected] wrote:

I’ve tried using libraries such as Lightbox, ThickBox, or iBox for
dialogs in my Rails apps

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:

http://developer.yahoo.com/yui/container/dialog/index.html

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 – http://lingr.com – 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.


Chris B., Hypsometry
http://hypsometry.com/
Web Application Design & Development

[email protected] wrote:

I’ve tried using libraries such as Lightbox, ThickBox, or iBox for
dialogs in my Rails apps (for example, thickbox is at
Cody Lindley | Front-end/Client-side/JavaScript Engineer | Boise,Idaho
). 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
executed.

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.

zsombor

Company - http://primalgrasp.com
Thoughts - http://deezsombor.blogspot.com

take a look at DOJO Toolkit.

http://dojotoolkit.org/

Jim

dialogs in my Rails apps
We started to use it for Lingr – http://lingr.com – 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.


Chris B., Hypsometry
http://hypsometry.com/
Web Application Design & Development


Get the new Windows Live Messenger!
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline

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

http://prototype-window.xilinus.com/