Hello I am using ''periodically_call_remote'' to get some stats from database and display it every N seconds, it''s works fine, but when I rewriting (by page.replace ...) content of the DIV which contains ''periodically_call_remote'' definition request are still executing... How to fix this confuse? Thanks in advance.
zven wrote:> Hello > > I am using ''periodically_call_remote'' to get some stats from database > and display it every N seconds, it''s works fine, but when I rewriting > (by page.replace ...) content of the DIV which contains > ''periodically_call_remote'' definition request are still executing... > How to fix this confuse? > > Thanks in advance.You''re going to have to clarify your question to get a response from this list. I''m not sure anyone understands what your problem is. -- Posted via http://www.ruby-forum.com/.
On Wed, 2006-06-07 at 18:35 +0200, Alex Wayne wrote:> You''re going to have to clarify your question to get a response from > this list. I''m not sure anyone understands what your problem is. >How to stop periodically_call_remote? Simple example: View: <div id="view"> <%= link_to_remote ''Stop tracking'', :url => { :action => ''stop'' } %> <%= periodically_call_remote :url => { :action => ''track_all'' }, :update => ''tracking'' %> <div id="tracking"></div> </div> Controller: def track_something # DATABASE ACCESS HERE .... render :partial => ''track'' end def stop render :update do |page| page.remove ''view'' end end When ''stop'' action executed, database access still work... It''s strange isn''t it?