Page Timiing Demo

This demo illustrates how you can determine how long a user is taking to fill out a form on your Web page.

Please tell us a bit about yourself!


Source Code:
<% If Len(Request("btnSubmit")) > 0 then
	' the user has already filled out the form
	' How much time did they spend on the page? 
	Dim tmrTotalTimeSpent
	tmrTotalTimeSpent = DateDiff("s", Request("tmrTimeVisited"), Now()) %>
	Hello <%=Request("txtName")%>!  Thank you for your information.
	It took you <%=tmrTotalTimeSpent%> seconds to completely read and
	fill out the form.
<% Else %>
	<b>Please tell us a bit about yourself!</b>
	<form method="get" action="TimingVisit.asp" id=form1 name=form1>
		<!-- hidden time counter variable -->
		<input type="hidden" name="tmrTimeVisited" value="<%=Now()%>">
		<b>Name:</b> <input type="text" name="txtName"><br>
		<b>Age:</b> <input type="text" size="3" name="txtAge">
		<input type="submit" name="btnSubmit" value="Send Info">
<% End IF %>	

[Return to the article]