开发者

How to send "multiple" extra parameters on a link/button_to_remote call?

In this example,

<%=button_to_remote "Get Related Users", {:url => { :action => 'get_related_users' }, 
          :update => 'result',:with=>"'someVal=3'"} %>

If I have to send one more key/value pair [someVal2=5], what will the :w开发者_如何转开发ith look like?


The docs say

A JavaScript expression specifying the parameters for the XMLHttpRequest. Any expressions should return a valid URL query string.

so I imagine that you would do something like

<%=button_to_remote "Get Related Users", {:url => { :action => 'get_related_users' }, 
          :update => 'result',:with=>"'someVal=3&someVal2=5'"} %>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜