Timer display
-
Hi there am using a javascript to display a timer while running the process but earlier was using input value but now i need it to start while on button click i have the javascript but i need to know how to make it run in c#, pls find the code snippet below. function convertClickHandle(){if(Form1.<b>button1</b>.<b>click</b>='30') {clock(); return true; }else{ lblMessage.innerText = 'ERROR';return false;}}"); i need to know how to start the timer in the button click in form1.i need help on function to start timer on button click event pls do the need ful. <!-- var startTime = null; function clock() { //for showing a clock while processing if (!document.layers && !document.all) return; if(startTime == null) startTime = new Date(); var newTime = new Date(); var diff = newTime.getTime() - startTime.getTime(); var hours = Math.floor(diff/(1000*60*60)); var diff = diff - (1000*60*60*hours); var minutes = Math.floor(diff/(1000*60)); var diff = diff - (1000*60*minutes); var seconds = Math.floor(diff/1000); if (minutes <= 9) minutes = "0" + minutes; if (seconds <= 9) seconds = "0" + seconds; dispTime = "<br/><h3>Please wait while the file is being processed<h3><br/><h1>" + hours + ":" + minutes + ":" + seconds + "</h1>"; textBox.style.visibility = "hidden"; timeTicker.style.visibility = "visible"; if (document.layers) { document.layers.write.timeTicker(dispTime); document.layers.timeTicker.close(); } else if (document.all) timeTicker.innerHTML = dispTime; setTimeout("clock()", 1000); } --> Regards ybasha