Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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;

}

 

}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...