Count down timer in .aspx page

laxman

Freshman
Joined
Jun 14, 2008
Messages
28
hi all,
i am developing an online application using asp.net 2.0 with C#
in this i have to show user how much time left to fill the form i am able give using below java script but when ever page refreshes it is starting from the first can you suggest me how to maintain time left even if page got refreshes also please check the below code or any alternative

<script type="text/javascript">
setInterval ( "doSomething()", 1000 );

function doSomething ( )
{
var att=document.getElementById("Txtpno").value;
att--;
if(att==0)
{
window.confirm("[laxman]");
}
else
{
document.getElementById("Txtrnk").value="Time left:"+att;
document.getElementById("Txtpno").value=att;
}

}
 
Back
Top