# Trying to get simple jquery example working for form\_remote\_tag

**URL:** <https://www.ruby-forum.com/t/trying-to-get-simple-jquery-example-working-for-form-remote-tag/123173>\
**Category:** Rails\
**Created:** [December 14, 2007, 5:03pm UTC](https://www.ruby-forum.com/t/trying-to-get-simple-jquery-example-working-for-form-remote-tag/123173 "2007-12-14T17:03:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 14, 2007, 5:03pm UTC](https://www.ruby-forum.com/t/trying-to-get-simple-jquery-example-working-for-form-remote-tag/123173/1 "2007-12-14T17:03:46Z")

</div>

I am trying to get a simple rails example working with jquery on  
windows. I had a simple example using form\_remote\_tag which worked  
fine using the default Rails scriptaculous and so on. I installed  
jrails as mentioned here: [EnnerChi.com is for sale | HugeDomains](http://ennerchi.com/projects/jrails)

the same example now seems to replace the entire html as if it wasn’t  
an ajax call. My render partial causes the partial to replace the  
whole  
html so that the stuff outside of my search\_results div (such as the  
entire form and everything else) as well as the div itself disappears.  
All that is left on the page is the results returned by the  
controller. If I then view the source it just show the results. When I  
had viewed the source using scriptaculous the results where not there,  
just the original unchanged html. Any ideas on this ?  
Here’s my basic controller and view stuff:

=========== index.rhtml ==========

\<% form\_remote\_tag :url =\> {:controller =\> ‘test’,

:action =\> ‘search’}, :update =\> ‘search\_results’ do %\>

Search \<%= text\_field\_tag :searchtxt, ‘’ %\>

\<%= submit\_tag ‘Submit’ %\>

\<% end %\>

\<%= render :partial =\> ‘results’ %\>

======= source page for index =======

Search

============= test\_controller.rb ============

def search

```
@res = []

..

.. # various code fills in @res etc

```

…

```
render :partial => 'results'

```

end

========== \_results.rhtml ============

\<%

if @res

@res.each do |r| %\>

\<%=r[‘title’]%\>

\<%= r[‘ttsummary’] %\>

  
  

\<% end

end

%\>

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 14, 2007, 5:08pm UTC](https://www.ruby-forum.com/t/trying-to-get-simple-jquery-example-working-for-form-remote-tag/123173/2 "2007-12-14T17:08:26Z")

</div>

I figured it out, I needed to copy the files from the plugin folder to  
the javascript folder in public
