I have periodically_call_remote
updating a div (main_div
) in my web app. This main_div
contains links that the user can click that invokes an action that overwrites data within main_div
.
My problem is that the timer is running on the periodically_call_remote
function and even though the user has navigated away from the page, that function call still wants to return. If the main_div
is present on the page the function call wipes out the data that was currently being displayed. If the main_div
is not on the page then the javascript returns an error dialog.
So, my question is, when the user navigates away from the div that is periodically being updated, how do I stop the function call?