Reputation: 11
The setTimeout function throws Invalid argument error. Can someone tell me what conversion I have to do for Settimeout to work? Thanks
var sessionTimeOutValue = '<%= Session.Timeout %>';
var delay = sessionTimeOutValue * 6000; //convert to milliseconds
setTimeout(Logout(), delay);
Upvotes: 0
Views: 412
Reputation: 50291
I guess Logout is a function which you have defined somewhere, so doing this will work
setTimeout(Logout, delay);
else
setTimeout(function(){Logout();},delay)
Upvotes: 1