RJS not working

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/.

Are you including a tag like this in your layout?

<%= javascript_include_tag :defaults %>

_Kevin