title: submit a rails remote form with javascript
body: <p>In my rails app I have a remote form that looks something like this for example:</p>
  
  <pre><code>&lt;%= form_tag some_path, :method =&gt; :get, :id =&gt; 'my-form', :remote =&gt; true do %&gt;
    &lt;%= text_field_tag :search, params[:search], :id =&gt; 'search-field' %&gt;
    &lt;%= submit_tag 'Go' %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Now i would like to submit this form via javascript and trigger all rails remote form callbacks. So far i have tried a few things but nothing seems to be working. </p>
  
  <p>Things i have tried:</p>
  
  <pre><code>$('#my-form').trigger('onsubmit')
  
  $.rails.callFormSubmitBindings( $('#search-form') )
  </code></pre>
  
  <p>but no luck so far. Any ideas?</p>