<%= 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')" %>