So here's my problem:
I've got one function that runs every 15 seconds. It checks to see if new comments have been added to a page.
I've got a form that submits a new comment once the submit button is pressed, then displays the new comment on the page.
In the process of adding a new comment, the "checkEvery15Seconds" function is querying the database at the same time, so I end up with duplicate comments on the page (not in the database though, this is purely a javascript issue).
How can I get my "submitComment" function to stop the "checkEvery15Seconds" function and restart it after the "submitComment" function has finished executing?