query: tag:remote_function

remote_functionではPost値を:withでいちいち指定する必要がある。
フィールドの数が多い場合は大変だ。

そういう場合、prototype.jsにForm.serialize('フォームのID')でフォームの値をname1=value1&name2=value2形式にしてくれる関数が便利である。

ruby>>
<%= javascript_include_tag "prototype" %>

<<ruby

posted by ysakaki ysakaki on Tue 19 Aug 2008 at 11:57 with 0 comments