Hi, I''m using link_to_remote to trigger an ajax zone, but depends on a varaible, the new zone has different features. before I has a button inside a form. so when I click on the button, I get the value of the variable inside "params". but since I use link_to_remote now, I don''t get any value from params anymore.... Is there some way I can get the data inside a form with link_to_remote function???? Thanks you very much Saiho __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Anatol Pomozov
2006-Mar-01 19:08 UTC
[Rails] link_to_remote, doesn''t receives params?????
See parameter :with of link_to_param function. You could pass any valid Javascript function i.e. :with=>"''value''+$F(''whatever'')" On 3/1/06, Saiho Yuen <sayoyo@yahoo.com> wrote:> > Hi, > > I''m using link_to_remote to trigger an ajax zone, but > depends on a varaible, the new zone has different > features. before I has a button inside a form. so when > I click on the button, I get the value of the variable > inside "params". but since I use link_to_remote now, I > don''t get any value from params anymore.... Is there > some way I can get the data inside a form with > link_to_remote function???? > > Thanks you very much > > Saiho > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- anatol (http://pomozov.info) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060301/50767fc8/attachment.html
Hi, thanks you very much for thew information, but I don''t really understand where I should start, I looked for a function "link_to_param" in rails api, but I didn''t find it... can you tell me where I should go???? Thanks you very much!!!! --- Anatol Pomozov <anatol.pomozov@gmail.com> wrote:> See parameter :with of link_to_param function. You > could pass any valid > Javascript function > i.e. :with=>"''value''+$F(''whatever'')" > > On 3/1/06, Saiho Yuen <sayoyo@yahoo.com> wrote: > > > > Hi, > > > > I''m using link_to_remote to trigger an ajax zone, > but > > depends on a varaible, the new zone has different > > features. before I has a button inside a form. so > when > > I click on the button, I get the value of the > variable > > inside "params". but since I use link_to_remote > now, I > > don''t get any value from params anymore.... Is > there > > some way I can get the data inside a form with > > link_to_remote function???? > > > > Thanks you very much > > > > Saiho > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > -- > anatol (http://pomozov.info) > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Anatol Pomozov
2006-Mar-02 01:21 UTC
[Rails] link_to_remote, doesn''t receives params?????
Hi, Saiho. Sorry, I made a typo. Of course link_to_remote And :with param you pass any additional parameter that you want to send to server. So if you have some element (for example button) and you would like to pass value of this element then you could do it with following snippet link_to_remote(... :with=>"''some_param_name'' + $F(''some_element_id'')") I hope that it is exactly you''ve asked. On 3/1/06, Saiho Yuen <sayoyo@yahoo.com> wrote:> > Hi, thanks you very much for thew information, but I > don''t really understand where I should start, I looked > for a function "link_to_param" in rails api, but I > didn''t find it... can you tell me where I should > go???? > > Thanks you very much!!!! > > --- Anatol Pomozov <anatol.pomozov@gmail.com> wrote: > > > See parameter :with of link_to_param function. You > > could pass any valid > > Javascript function > > i.e. :with=>"''value''+$F(''whatever'')" > > > > On 3/1/06, Saiho Yuen <sayoyo@yahoo.com> wrote: > > > > > > Hi, > > > > > > I''m using link_to_remote to trigger an ajax zone, > > but > > > depends on a varaible, the new zone has different > > > features. before I has a button inside a form. so > > when > > > I click on the button, I get the value of the > > variable > > > inside "params". but since I use link_to_remote > > now, I > > > don''t get any value from params anymore.... Is > > there > > > some way I can get the data inside a form with > > > link_to_remote function???? > > > > > > Thanks you very much > > > > > > Saiho > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Tired of spam? Yahoo! Mail has the best spam > > protection around > > > http://mail.yahoo.com > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > -- > > anatol (http://pomozov.info) > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- anatol (http://pomozov.info) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060302/3f2686eb/attachment.html
Anatol Pomozov wrote:> Hi, Saiho. > > Sorry, I made a typo. Of course link_to_remote > And :with param you pass any additional parameter that you want to send > to > server. So if you have some element (for example button) and you would > like > to pass value of this element then you could do it with following > snippet > > link_to_remote(... :with=>"''some_param_name'' + $F(''some_element_id'')") > > I hope that it is exactly you''ve asked.How do i pass another value into the :with, im trying to do a date from and date to search? now i can only pass one value. -- 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 -~----------~----~----~----~------~----~------~--~---