Without seeing the code it is impossible to say what is wrong exactly, but probably the loop you must have is possibly using increasing amounts of the browser's resources.
You can remove the loop which should remove the problem, javaScript has a setTimeout method (
see[
^]). You set the timer and a callback function is called when the timeout happens, you should set the timeout to 15 minutes.
Finally, I doubt what you want can be acheived with
total reliability. The user will probably be able to circumvent the 15-mins auto-submission, so you should keep timestamps on the backing store at the very least.