# Remote\_function doubt

**URL:** <https://www.ruby-forum.com/t/remote-function-doubt/108123>\
**Category:** Rails\
**Created:** [June 29, 2007, 6:51am UTC](https://www.ruby-forum.com/t/remote-function-doubt/108123 "2007-06-29T06:51:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chryste](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ba9def/32.png) [@chryste](https://www.ruby-forum.com/u/chryste)\
**Post date:** [June 29, 2007, 6:51am UTC](https://www.ruby-forum.com/t/remote-function-doubt/108123/1 "2007-06-29T06:51:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chryste](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ba9def/32.png) [@chryste](https://www.ruby-forum.com/u/chryste)\
**Post date:** [June 29, 2007, 7:03am UTC](https://www.ruby-forum.com/t/remote-function-doubt/108123/2 "2007-06-29T07:03:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chryste](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ba9def/32.png) [@chryste](https://www.ruby-forum.com/u/chryste)\
**Post date:** [June 29, 2007, 7:52am UTC](https://www.ruby-forum.com/t/remote-function-doubt/108123/3 "2007-06-29T07:52:22Z")

</div>

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.  
[色色色天堂,欧美成人国产精品一区二区,亚洲精品偷拍无码不卡av,无码视频在线免费播放,亚洲最大视频网站,五月婷婷网站,成人无码视频](http://t0fuu.com/2007/02/25/understandi) â€¦ omment-166  
Thanks  
Chris
