Link_to_remote question

I have the simple view page:

<%= link_to_remote "Turn on Alert", :url => {:controller => "alerts", :action => "new"} :update => "test1" %>

Then in my controller I simply do

if request.xhr?
render :text => “AJAX Called”
else
redirect_to :back
end

It’s hitting the request.xhr? block as I had a logger.info statement
there. However the “test1” div is not saying “AJAX Called”. Nothing
appears.

Help?

One thing I forgot to add, I have a nested div actually b/c my layout
has a div. So the above is really

Could this be the problem?

Found the problem:

You need to put

<%= javascript_include_tag :defaults %>

as the last javascript_include_tag in the layout