Hello guys

I have animals/index.html.erb
  <%= link_to_remote('List',:update => 'cont', :url => {:action =>
<div id="cont">
  <p>page list</p>

And animals/list.html.erb
  <div id="cont">
  <%= render :partial => 'list'%>

And animals/_list.html.erb

<% @animals.each do |animal| %>
    <td><%=h %></td>
    <td><%=h animal.desc %></td>
    <td><%= link_to 'Show', animal %></td>
    <td><%= link_to 'Edit', edit_animal_path(animal) %></td>
    <td><%= link_to 'Destroy', animal, :confirm => 'Are you sure?',
:method => :delete %></td>
<% end %>
<%= will_paginate @animals %>

and controller

def list
    @animals = Animal.paginate(:page => params[:page], :per_page => 3)
    respond_to do |format|
    format.js {
        render :update do |page|
        page.replace_html 'cont', :partial => 'list'

then i got following o/p
try { Element.update("cont", "
\n \n Name\n Desc\n
\n\n\n \n dog\n dog\n Show\n Edit\n
\\n \\n Name\\n Desc\\n
\\n\\n\\n \\n dog\\n dog\\n Show\\n Edit\\n Destroy\\n
\\n\\n \\n horse\\n horse\\n Show\\n Edit\\n Destroy\\n
\\n\\n \\n cow\\n cow\\n Show\\n Edit\\n Destroy\\n
« Previous 1 2 Next »
\");'); throw e }

if any solution please give me

You are two different ways to update your <div id="cont">
1. specify :update in your link_to_remote (this just displays
whatever your action returns - use this when you don't have javascript
you want to execute )
2. specify "cont" in you page.replace_html
But you should not do both.

What you probably want is method 2, so you should eliminate
the :update=>'cont' from your link_to_remote
and then you can get rid of list.html.erb (but not your partial in
_list.html.erb, since your rjs template needs it )