Instance variable won't update using basic Ajax script

damn strait you can't do that

<div id="status"> <%= render :partial => 'status', :locals => {:traps => @trap} %> </div>

:partial => status:

<table> <% even_odd = 0 traps.each do |trap| even_odd = 1 - even_odd %> <tr class="background<%= even_odd %>"> <td><%=trap.datetime %></td> <td><%=trap.description %></td> </tr> </table>

def update_data         @trap = Trap.find(:all, :order => "datetime DESC")         render :partial => 'status', :locals => {:traps => @trap} end

thanks alot for the help Keynan...I NEVER would have guessed the syntax on that. I googled this problem for hours and found no documentation worth anything. I put in the code you suggested, but am getting errors.

I am gettting an error in my view:

         wrong number of arguments (0 for 3)

it doesn't like the following line:

      <%= render :partial => 'status', :locals => {:traps => @trap} %>

It might be a mistake on my interpretation of your instructions, here's what I have in my config based on your advice: ------------begin view --------------------------- <%= periodically_call_remote( :update => "status",:frequency => 2,:url => { :action => :update_data }) %>

<table width="100%"> <tr class="background0"> <td>&nbsp;</td> </tr> :partial => status: <div id="status"> <%= render :partial => 'status', :locals => {:traps => @trap} %> </div> </table> <table width="100%" border="0"> <% even_odd = 0 traps.each do |trap| even_odd = 1 - even_odd %> <tr class="background<%= even_odd %>"> <td><%=trap.datetime %></td> <td><%=trap.desc1 %></td></tr> <% end %> </table> ----------------end view -------------------------- ----------------begin controller ------------------ def update_data         @trap = Trap.find(:all, :order => "datetime DESC")         render :partial => 'status', :locals => {:traps => @trap} end ---------------end controller----------------------- I really appreciate the help on this....thanks.

jackster