Forum: Ruby on Rails Using a lightbox as login form

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
TomRossi7 (Guest)
on 2007-03-13 22:36
(Received via mailing list)
I've been trying to use a lightbox as a login for users. If the user
successfully logs in, an RJS should be rendered to close the lightbox
and update some elements on the page. If the login fails, the lightbox
is updated with a login message and forgot password button.

I haven't been able to accomplish this with the Lightbox from Particle
Tree because it appears to escape the rendered JavaScript.  I'm not so
hot with Javascript, so please go easy on me!
Xavier N. (Guest)
on 2007-03-14 12:40
(Received via mailing list)
On Mar 13, 2007, at 9:35 PM, TomRossi7 wrote:

> I've been trying to use a lightbox as a login for users. If the user
> successfully logs in, an RJS should be rendered to close the lightbox
> and update some elements on the page. If the login fails, the lightbox
> is updated with a login message and forgot password button.
>
> I haven't been able to accomplish this with the Lightbox from Particle
> Tree because it appears to escape the rendered JavaScript.  I'm not so
> hot with Javascript, so please go easy on me!

I'd recommend using Redbox instead if possible:

   http://blog.craigambrose.com/articles/2006/09/22/r...

because it comes with handy Rails helpers.

-- fxn

PS: In the current version there's a gotcha related to Firefox:
Search for ">= 0" in that page and apply the minor edition explained
around in the first occurrence.
Luca M. (Guest)
on 2007-03-14 13:45
(Received via mailing list)
I second the suggestion from xavier, but i also think that your problem
may
not be in the lightbox implementation but in the way you call the remote
action. rjs responses are javascript and as such should not be triggered
by
calls that expect html fragments (e.g. calls with an :update option)

hope this helps,

Luca


2007/3/14, Xavier N. <removed_email_address@domain.invalid>:
This topic is locked and can not be replied to.