Remote_function doubt

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

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

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs