Hi all, I have two hidden fields in a form purpose_id and qtntype_id. I need to pass these two to the controller. I''m trying the following code in a javascript function <%= remote_function(:update => "list3", :url => { :controller => "question", :action => "show"}, :with => "Form.Element.serialize(qtnlist.purpose_id)", :with => "Form.Element.serialize(qtnlist.diseaselist_id)" )%> Is this correct? Am I wrong in the syntax. Thanks Chris -- 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 made a mistake earlier. here is the new post. Hi all, I have two hidden fields in a form purpose_id and qtntype_id. I need to pass these two to the controller. I''m trying the following code in a javascript function <%= remote_function(:update => "list3", :url => { :controller => "question", :action => "show"}, :with => "Form.Element.serialize(qtnlist.purpose_id)", :with => "Form.Element.serialize(qtnlist.qtntype_id)" )%> Is this correct? Am I wrong in the syntax. Thanks Chris -- 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 -~----------~----~----~----~------~----~------~--~---
Sorry every one, sorry to trouble you. But I found out the way. Just use Form.serialize(qtnlist) This will send all the values in the form. The following blog helped me out. You may check it if you like. http://t0fuu.com/2007/02/25/understandi ... omment-166 Thanks Chris -- 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 -~----------~----~----~----~------~----~------~--~---