# RJS not working

**URL:** <https://discuss.rubyonrails.org/t/rjs-not-working/3537>\
**Category:** rubyonrails-talk\
**Created:** [October 24, 2006, 8:18pm UTC](https://discuss.rubyonrails.org/t/rjs-not-working/3537 "2006-10-24T20:18:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![olbrich](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/olbrich/32/10820_2.png) [@olbrich](https://discuss.rubyonrails.org/u/olbrich)\
**Post date:** [October 24, 2006, 8:18pm UTC](https://discuss.rubyonrails.org/t/rjs-not-working/3537/1 "2006-10-24T20:18:42Z")

</div>

MJ wrote:

> Hi,
> 
> I just can't seem to get my RJS template to work. I have this in my .rhtml file: \<%= link\_to\_remote( "1", {:url =\> { :controller =\> "log", :action =\> "rate", :id =\> post.id, :rating =\> 1}}, :class =\> 'one-star', :name =\> 'Rate this post 1 star out of 3') %\>
> 
> My rate.rjs has this (for testing purposes): page.alert('RJS works!')
> 
> That doesn't that a thing. So I added this to my .rhtml file: \<%= link\_to\_remote( "3", {:url =\> { :controller =\> "log", :action =\> "rate", :id =\> post.id, :rating =\> 3}, :complete=\>'alert(request.responseText)'}, :class =\> 'three-stars', :name =\> 'Rate this post 3 star out of 3') %\>
> 
> Now I get a popup saying: alert('RJS Works!') instead of actually doing the alert.
> 
> any ideas?
> 
> MJ
> 
> -- Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

Are you including a tag like this in your layout?

\<%= javascript\_include\_tag :defaults %\>

\_Kevin
