javascript countdown timer for session timeout
<p>I want to alert the user that the session timeout is about to expire. I want to have a popup with an OK button and show the seconds ticking down on the popup. Can i do this with just java script?
Im OK with using C# code behind also.</p>

<p>Right now it detects session timeout and pops up telling them the session has expired.</p>

<pre><code>&lt;script type="text/javascript"&gt;

var sessionTimeout = "&lt;%= Session.Timeout %&gt;";

function DisplaySessionTimeout() {

sessionTimeout = sessionTimeout - 1;

if (sessionTimeout &gt;= 0)

  window.setTimeout("DisplaySessionTimeout()", 60000);

else
{
alert("Your current Session is over due to inactivity.");
}
}


&lt;/script&gt;
</code></pre>
