Page “Main” uses setInterval in combination with jQuery.load to load content from “Sub” page.
I need to be able to stop auto refresh from happening, if “Sub” page contains a specific flag.
In other words, the “Sub” page should be reloaded until it tells Main to stop auto refresh.
What is the best way to achieve this?
Check for the flag in the callback handler for the load event and clear the interval timer if the flag is found.