# Newbie: AJAX not working - Undefined Method error

**URL:** <https://www.ruby-forum.com/t/newbie-ajax-not-working-undefined-method-error/111870>\
**Category:** Rails\
**Created:** [August 12, 2007, 6:42pm UTC](https://www.ruby-forum.com/t/newbie-ajax-not-working-undefined-method-error/111870 "2007-08-12T18:42:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jules](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/41988e/32.png) [@jules](https://www.ruby-forum.com/u/jules)\
**Post date:** [August 12, 2007, 6:42pm UTC](https://www.ruby-forum.com/t/newbie-ajax-not-working-undefined-method-error/111870/1 "2007-08-12T18:42:08Z")

</div>

Hello

I have included prototype in my Applications rhtml file

 \<%= javascript\_include\_tag "prototype" %\> FLYPRO \<%= stylesheet\_link\_tag 'flypro' %\>

I call link\_to\_remote in a page as follows

\<%= link\_to\_remote("Do Something", :update =\> 'flypro-list', :url =\> { :action =\> :list})%\>

But when I hit the Link I get undefined method `link\_to\_remote’ for  
#\<#Class:0x3706090:0x3706054

The translated page viewed as source, has translated link\_to\_remote  
into

Do Something\</  
a\>

This looks OK, so I don’t understand why I get undefined method error  
on “periodcally\_call\_remote”, when it should be hooking up to  
Ajax.updater, which does exist in prototype ? prototype does exist  
under the public/javascripts folder.

Am I using the wrong prototype.js ? I cannot find any ‘link\_to\_remote’  
functions in prototype.js, so where is it defined ?

Any help appreciated

Thanks

Julian
