Re: timestamp at start of filling out form and form completion



brkn wrote:
On Nov 25, 10:36 am, "Peter H. Coffin" <hell...@xxxxxxxxxxxxx> wrote:
On Wed, 25 Nov 2009 05:05:04 -0800 (PST), C.



(http://symcbean.blogspot.com/) wrote:
On Nov 24, 4:06 pm, "Peter H. Coffin" <hell...@xxxxxxxxxxxxx> wrote:
On Tue, 24 Nov 2009 04:52:27 -0800 (PST), Skygal wrote:
I'd like to be able to determine how long a user took to fill out a
form. I'm assuming it would be by getting a timestamp at beginning
of the form and again when user clicks on submit. Has anyone ever
done this?
When sendingthe form, include a hidden field that contains the
current timestamp. If your form page is generated by php, this
becomes trivially easy.
The only caveat with this approach is that you'll be able to measure
the interval between the form being generated and the submit arriving
back at the server - if you want to exclude the network time at either
end then you'd need to capture the arrival time using javascript, then
work out the delay in the forms onsubmit method and populate this into
a field on the form before the onsubmit method returns.
How/where you capture the arrival time will have a significant impact
on what it is you actually measure - using inline javascript should
trigger the capture some time between the code arriving at the browser
and the html file loading completely (unless it calls some javascript
from a seperate file). OTOH, the page.onload method only fires after
all the content explicitly referenced in the HTML file has loaded.
Note that you can't mix and match server and client filestamps - only
calculate intervals using like-for-like.
Mostly true, but I contest the "significant impact". OP wanted to know
how long it took someone to fill out out a form, and a few seconds on
network time is unlikely to be an appreciable portion of the time taken
to fill out a form. If it is, the amount of time filling out a single
form is so short that it's not going to be a relaible figure anyway and
once would be better off measuring something like "number of forms per
hour".

--
17. When I employ people as advisors, I will occasionally listen to
their advice.
--Peter Anspach's list of things to do as an Evil Overlord

Agreed.


OP: You can also use sessions. That way, every form generation is
unique.

What do sessions have to do with the ops query? The only think I can think of is to store the beginning timestamp (rather than storing it in the form). Sessions have nothing to do with whether a form is unique or not.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.