[Rails] Re: AJAX: do render but show element in same click?
Micah Bly
mbly at inter-l.com
Wed Mar 1 18:17:18 GMT 2006
Dean wrote:
>
> <%= link_to_remote "Do AJAX!", :update => "note1", :loaded =>
> "element.show('note1') %>
>
> Find more cool things to do with link_to_remote at
> http://api.rubyonrails.org/
Dean,
Thanks for the help. You know, I *do* spend time with the API, it's
just there's a lot to learn... I read that section twice, didn't pick up
on the fact I could be launching other JS actions... <sigh>
This does work for me btw, but only once. It shows the div, but once I
do element.hide(), this won't ever show the div again. I ended up using
element.update('mydiv','') as the "hide" action. It works *almost* as
well.
Thanks again,
Micah
--
Posted via http://www.ruby-forum.com/.
More information about the Rails
mailing list