railsmailinglist-hImCXEL61vXR7s880joybQ@public.gmane.org
2006-Jan-28 03:57 UTC
Help with multiple actions
I got a question I currently have a form_remote_tag and in it, I would like to
include two :before actions such as :before =>
%(Element.show(''item'')), :before
=> visual_effect(:blind_up, ''window'') but if I have them as
such the last
:before is executated and the first one isn''t, how would I be able to
have them
both execute when the :before callback happens?
Don''t know much about RoR, but as far as the effects go,
you''ll have to
create a "wrapper" function that adds both the effects in one. If you
don''t
have that, you''ll always just overwrite your previous
"before" function each
time you call it.
The javascript should end up like so...
before: function(){ Element.show(''item''); new
Effect.BlindUp(''window''); }
maybe someone else knows the RoR code to create that?
On 1/27/06, railsmailinglist-hImCXEL61vXR7s880joybQ@public.gmane.org
<railsmailinglist-hImCXEL61vXR7s880joybQ@public.gmane.org>
wrote:>
> I got a question I currently have a form_remote_tag and in it, I would
> like to
> include two :before actions such as :before =>
%(Element.show(''item'')),
> :before
> => visual_effect(:blind_up, ''window'') but if I have
them as such the last
> :before is executated and the first one isn''t, how would I be able
to have
> them
> both execute when the :before callback happens?
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs