Using a lightbox as login form

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!

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/redbox-release-2

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.

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. [email protected]: