# Submit\_form for Ajax via xhr

**URL:** <https://www.ruby-forum.com/t/submit-form-for-ajax-via-xhr/81071>\
**Category:** Rails\
**Created:** [January 3, 2007, 4:12pm UTC](https://www.ruby-forum.com/t/submit-form-for-ajax-via-xhr/81071 "2007-01-03T16:12:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [January 3, 2007, 4:12pm UTC](https://www.ruby-forum.com/t/submit-form-for-ajax-via-xhr/81071/1 "2007-01-03T16:12:43Z")

</div>

Railsters:

The assert\_select system has a submit\_form method that reads your  
current page’s form, and submits all its fields with their data. This  
works great for Test Driven Development because it tests your current  
page’s form and your controller’s action at the same time.

Is there a submit\_form that calls xhr, to submit a FORM thru Ajax? How  
easy would that be to add?

–  
Phlip  
[http://c2.com/cgi/wiki?ZeekLand](http://c2.com/cgi/wiki?ZeekLand) ← NOT a blog!!
