I have a form wich I want to show it only if I clic on a link. I want that form, with div="related", to appear with the Appear effect of scriptaculous. This form alreday has some AJAX. -- 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 -~----------~----~----~----~------~----~------~--~---
On Apr 5, 1:51 pm, John Smith <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I have a form wich I want to show it only if I clic on a link. I want > that form, with div="related", to appear with the Appear effect of > scriptaculous. This form alreday has some AJAX.Something along the lines of link_to_function ''ClickMe'', "$ (''some_id'').appear()" will make the page element with that id appear. Fred --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On Apr 5, 1:51�pm, John Smith <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: >> I have a form wich I want to show it only if I clic on a link. I want >> that form, with div="related", to appear with the Appear effect of >> scriptaculous. This form alreday has some AJAX. > > Something along the lines of link_to_function ''ClickMe'', "$ > (''some_id'').appear()" will make the page element with that id appear. > > FredMy code is: <div id ="fadePic"> <img alt = "my_image" src = "/images/Logo_small.jpg" /> </div> <%= link_to_function "Appear", "new Effect.Appear(''fadePic'', { duration:2 })" %> I want the fadepic only to appear in my view once I press the Appear link. -- 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 5 Apr 2008, at 17:57, John Smith wrote:> > Frederick Cheung wrote: >> On Apr 5, 1:51�pm, John Smith <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> >> wrote: >>> I have a form wich I want to show it only if I clic on a link. I >>> want >>> that form, with div="related", to appear with the Appear effect of >>> scriptaculous. This form alreday has some AJAX. >> >> Something along the lines of link_to_function ''ClickMe'', "$ >> (''some_id'').appear()" will make the page element with that id appear. >> >> Fred > > My code is: > > <div id ="fadePic"> > <img alt = "my_image" src = "/images/Logo_small.jpg" /> > </div> > > <%= link_to_function "Appear", > "new Effect.Appear(''fadePic'', { duration:2 })" %> >Style it so that it is initially invisible. (display: none) Fred> I want the fadepic only to appear in my view once I press the Appear > link. > -- > 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---