Hi all,
I have a monitoring component in which my app continuously grabs data from the database through a controller which is triggered by a javascript call as follows:
$.web2py.component("{{=URL('controller', 'my_function.load')}}", "my_target", timeout=2000, times='Infinity');
As you can see, this component is calling my controller every 2s for an infinite number of times and it works well.
Now, I would like to add an option to allow the user to arbitrarily stop this monitoring component but I could not find a way to trap and stop the JS call above (nor its reload_check) once the page and the component are loaded. Any ideas?
Thank you
Kind regards,
Francisco