Hai Nitin,
  Now  I have made the following changes in my code.But the page is not 
refreshing at all.What could be the problem?

readings controller

def show_current_readings
   @range=ConfigureParameter.find(:all)
    if (params[:state] =="")
      @readings = CurrentReading.find(:all)
    else
    stations = Station.find_all_by_state(params[:state])
    @readings = CurrentReading.find_all_by_station_id(stations, 
:order=>"station_id")
    end
   render :update do |page|
      page.replace_html :current_reading, 
:partial=>'current_readings_list'
   end
end

readings/index.html.erb

<%= periodically_call_remote(:url => { :action=> :show_current_readings 
}, :frequency => 5)%>

_current_readings.html.erb

#code inside  "current_reading"  div tag


Thanks
Veena
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to