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;
}
}
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;
}
}