# Form\_remote\_tag not sending xml\_http\_request

**URL:** <https://www.ruby-forum.com/t/form-remote-tag-not-sending-xml-http-request/103147>\
**Category:** Rails\
**Created:** [May 2, 2007, 12:25pm UTC](https://www.ruby-forum.com/t/form-remote-tag-not-sending-xml-http-request/103147 "2007-05-02T12:25:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [May 2, 2007, 12:25pm UTC](https://www.ruby-forum.com/t/form-remote-tag-not-sending-xml-http-request/103147/1 "2007-05-02T12:25:11Z")

</div>

I have a form defined in a view :

\<% form\_remote\_tag( :url =\>{:action =\> ‘list’ }, :html =\> {:id =\>  
‘prop\_search\_form’, :name =\> “prop\_search\_form”}) do %\>  
…  
\<% end %\>

when submitted, the check in list action of the controller is not  
performed

```
if request.xml_http_request?
  render :partial => 'result_area', :layout => 'false'
end

```

debugging gives :  
request.xml\_http\_request? =\> false

why ?

the html code generated seems to be correct :

where am I wrong ?

thanks for your help

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [May 2, 2007, 12:45pm UTC](https://www.ruby-forum.com/t/form-remote-tag-not-sending-xml-http-request/103147/2 "2007-05-02T12:45:57Z")

</div>

for one - you are looking for request.xhr instead of  
request.xml\_http\_request? see page 542 of the agile web development  
book.

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [May 2, 2007, 1:50pm UTC](https://www.ruby-forum.com/t/form-remote-tag-not-sending-xml-http-request/103147/3 "2007-05-02T13:50:29Z")

</div>

Ivor P. wrote:

> for one - you are looking for request.xhr instead of  
> request.xml\_http\_request? see page 542 of the agile web development  
> book.

thanks

I thought request.xhr? and request.xml\_http\_request? were equivalent …

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [May 2, 2007, 2:46pm UTC](https://www.ruby-forum.com/t/form-remote-tag-not-sending-xml-http-request/103147/4 "2007-05-02T14:46:39Z")

</div>

Ivor P. wrote:

> for one - you are looking for request.xhr instead of  
> request.xml\_http\_request? see page 542 of the agile web development  
> book.

Well I see what could be the problem even if I don"t know yet teh  
solution :

I am using a form\_remote\_tag, but I am not using a submit button…  
instead, as I have a rollover button I use a link w onclick :submit()

search

could it be the problem ?
