Currently, I am working on a web page using ASP.NET and have created a sessionTimer JavaScript function with an "if/else" conditional statement. The function retrieves a variable from the config file by calling an ASP.net function in the if clause, and then calls another ASP.net function in the else clause to perform additional actions. However, the issue I am facing is that this code always ends up calling the .ASP function within the else loop consistently. Can you provide insights into why this might be happening?
var sessionTimeout = 1;
function Timerfunction()
{
sessionTimeout = sessionTimeout - 1;
var sessiontimoutValue = '<%= GetSessionTimeout() %>';
if (sessionTimeout >= 0) {
window.setTimeout("Timerfunction()", sessiontimoutValue);
}
else {
var result = '<%= Timer_Timedout() %>'
}
}