Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
SetInterval called function crashes
When I click "Continue" another error pops up:
"There is no source code available for the current location. [OK]"
When I step through the code, it crashes after exiting one of the timer functions. It's as if it has no place to go when it returns to caller.
Here's the script code stripped down to the bare ninimum (still crashes!)
// JScript File
var tmr1, tmr2
} // crashers when it exits here.
function btnStart_click() // This executes when I click the "Start" button
if (tmr1 == null)
var delay = parseInt(document.getElementById("txtRate").value)
tmr1 = setInterval("HitScreen()", delay)
if (tmr2 == null)
tmr2 = setInterval("ReCallServer()", 100)
if (tmr2 != null)
tmr2 = null
The web page is actually an ASP.Net page with AJAX controls: A Script manager, and some slider controls, along with some buttons, text boxes, div boxes, etc. I don't know if any of that is a factor. The same errors occur when I debug with firefox.
0 · ·