indupriya9
Programmer
Hi there
I would like to capture time spent on the form and display the same on the next page on submitting the form.
The code I am using on the form is as follows:
The code I have on the testpage.asp is as follows:
But it does not display anything on the next page.
Can anyone please let me know where I am going wrong?
Thanks in advance
ip
I would like to capture time spent on the form and display the same on the next page on submitting the form.
The code I am using on the form is as follows:
Code:
<BODY ms_positioning="FlowLayout" onLoad="startTime = new Date(); document.form1.startTime.value=startTime.valueOf();" onUnload="endTime = new Date(); document.form1.timerField.value = endTime.valueOf() - startTime.valueOf();">
<form name="form1" method="post" action="testpage.asp">
<input type="hidden" name="timerField" >
</form>
The code I have on the testpage.asp is as follows:
Code:
dim timer
timer=Request.Form("timerField")
Response.Write "Timer:" &timer
Response.End
But it does not display anything on the next page.
Can anyone please let me know where I am going wrong?
Thanks in advance
ip