I would like to add a visual effect to one of my web pages and in the stage where I don''t know what I don''t know. I''ve talked to my buddy Google about this and (s)he has pointed me at a number of different web pages that all seem to have 2006 dates on them. I can try looking at them more carefully (and will keep looking), but I thought I would toss my question out to you folks in the mean time. I would like to display (in my #index view) a table of some data. Most (if not all) of the rows have other data associated with them. I would like to display a plus sign next to each row which, when clicked by the user, would expand the view to include the associated data -- sort of like the way Gmail can expand and collapse "conversations". Can anybody point me at a recent tutorial that might get me started down this path? Thanks... --wpd --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Wed, Sep 16, 2009 at 12:35 PM, Patrick Doyle <wpdster-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I would like to add a visual effect to one of my web pages and in the stage > where I don''t know what I don''t know. > > Can anybody point me at a recent tutorial that might get me started down > this path?Sounds like you just need to learn Javascript. Doesn''t seem like a Rails problem/question at all. -- Greg Donald http://destiney.com/
On Wed, Sep 16, 2009 at 2:47 PM, Greg Donald <gdonald-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Wed, Sep 16, 2009 at 12:35 PM, Patrick Doyle <wpdster-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > Can anybody point me at a recent tutorial that might get me started down > > this path? > > Sounds like you just need to learn Javascript. Doesn''t seem like a > Rails problem/question at all. > > That''s a fair reply. I have read (without understanding) a number ofdifferent posts about how great "RJS" is because it hides all of that messy Javascript from the Rails developer. I imagine one can only appreciate how great RJS is once one has a certain amount of Javascript experience and has learned how messy it can be. I''ll head down that path. Thanks. --wpd --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
There are different paths you can take. Prototype/Scriptaculous is (currently) incorporated into the framework, so that can be an easy place to start (particularly when using rjs to deal with controller- type actions in your controllers). Another route is to learn and use jQuery or another javascript frameworks). These may behave differently, and have benefits or weaknesses when compared with Prototype. The API documentation for the frameworks themselves are really helpful places to start. For using them with Rails, railscasts.com is a fantastic place to get pointers (search for ''rjs'', ''prototype'' or ''jQuery''). On Sep 16, 12:14 pm, Patrick Doyle <wpds...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Wed, Sep 16, 2009 at 2:47 PM, Greg Donald <gdon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On Wed, Sep 16, 2009 at 12:35 PM, Patrick Doyle <wpds...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Can anybody point me at a recent tutorial that might get me started down > > > this path? > > > Sounds like you just need to learn Javascript. Doesn''t seem like a > > Rails problem/question at all. > > > That''s a fair reply. I have read (without understanding) a number of > > different posts about how great "RJS" is because it hides all of that messy > Javascript from the Rails developer. I imagine one can only appreciate how > great RJS is once one has a certain amount of Javascript experience and has > learned how messy it can be. > > I''ll head down that path. Thanks. > > --wpd
Hi, you will simply need to create a div with the data in a hidden row below and add the javascript to the onclick option. This is actually so simple that it not worth encapsulating this in rails, imho. Check this link: http://wiki.github.com/madrobby/scriptaculous/effect-appear
Patrick Doyle wrote:> I would like to add a visual effect to one of my web pages and in the > stage > where I don''t know what I don''t know. I''ve talked to my buddy Google > about > this and (s)he has pointed me at a number of different web pages that > allHi search for tree table plugin if you are using jquery jquery has treetable plugin and another plugin http://boagworld.com/development/creating-a-draggable-sitemap-with-jquery -- Posted via http://www.ruby-forum.com/.
If you have the time get a copy of the book Ajax on Rails (O''Reilly). It''s excellent. On Sep 16, 1:35 pm, Patrick Doyle <wpds...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I would like to add a visual effect to one of my web pages and in the stage > where I don''t know what I don''t know. I''ve talked to my buddy Google about > this and (s)he has pointed me at a number of different web pages that all > seem to have 2006 dates on them. I can try looking at them more carefully > (and will keep looking), but I thought I would toss my question out to you > folks in the mean time. > > I would like to display (in my #index view) a table of some data. Most (if > not all) of the rows have other data associated with them. I would like to > display a plus sign next to each row which, when clicked by the user, would > expand the view to include the associated data -- sort of like the way Gmail > can expand and collapse "conversations". > > Can anybody point me at a recent tutorial that might get me started down > this path? > > Thanks... > > --wpd