AJAX/Form array problem

<%= observe_field("format[id]",    :frequency => 0.25,    :update => "infoprijs",    :url => { :action => :getprijs },    :with => "'format_id='+encodeURIComponent(value)+ '&quantity='+encodeURIComponent($('quantity[id]').value)+ '&product='+encodeURIComponent($('product[id]').value)") %>

Now to add the options i thought i had to add the following (which is clearly wrong since ruby keeps hating me for it)

Perhaps I'm missing the point, but couldn't you use Form.serialize? e.g. <%= observe_field("format[id]",     :frequency => 0.25,     :update => "infoprijs",     :url => { :action => :getprijs },     :with => "Form.serialize('form-name')" %>

<%= observe_field("format[id]",      :frequency => 0.25,      :update => "infoprijs",      :url => { :action => :getprijs },      :with => "Form.serialize('form-name')" %>

The above stuff missed a bracket at last!

Try this...

<%= observe_field("format[id]",      :frequency => 0.25,      :update => "infoprijs",      :url => { :action => :getprijs },      :with => "Form.serialize('form-name')" ) %>