I want to use RoR and its built-in Ajax functions to display a list of objects on a page like so: ------------- Item 1 Item 2 Item 3 --------------- each item, when clicked on will load a description of the item. I want to do this w/out loading another page and just want it rendered on the same page. Is this possible or am i overstepping functionality here? Example...from the list above, say i click item 2 like so: ----------------- Item 1 Item 2 *click* Item 3 -------------------- ------------------------------- back Item 2 Info...blah blah blah more info on item 2... -------------------------------- -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Certainly is possible. You''ll want to use a combination of hidden DIVs and RJS to show those DIVs again. Before showing the DIV you can also replace the contents of the DIV using RJS. Lots ''o tutorials floating around on the web. -- Roderick van Domburg http://www.nedforce.nl -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I did something similiar with a credit card list, but I think if you had a list and a hidden div and then set up your list items as links using the link_to_remote helper you could then use the :update symbol to update that hidden div without reloading the page. <%= link_to_remote ''Delete'', :url => { :action => ''delete_credit_card'' }, :update => ''credit_card_table'' %> credit_card_table would be my hidden div. Then in my delete_credit_card method I could render :partial or render_text so that when the :update happens it knows what to update with. Hope this helps, good luck, ~S -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Roderick van Domburg wrote:> Certainly is possible. You''ll want to use a combination of hidden DIVs > and RJS to show those DIVs again. Before showing the DIV you can also > replace the contents of the DIV using RJS. > > Lots ''o tutorials floating around on the web. > > -- > Roderick van Domburg > http://www.nedforce.nlwould you mind linking me to some of these as i am unable to find them. At least in any sort of manner that i can understand. thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---