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



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.

--
Science is like sex:
 sometimes something useful comes out, but that's not why we're doing it.
              -- Richard Feynman

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.

C.
.



Relevant Pages

  • Re: timestamp at start of filling out form and form completion
    ... I'm assuming it would be by getting a timestamp at beginning ... end then you'd need to capture the arrival time using javascript, ... a field on the form before the onsubmit method returns. ... all the content explicitly referenced in the HTML file has loaded. ...
    (comp.lang.php)
  • Re: timestamp at start of filling out form and form completion
    ... I'm assuming it would be by getting a timestamp at beginning ... end then you'd need to capture the arrival time using javascript, ... a field on the form before the onsubmit method returns. ... all the content explicitly referenced in the HTML file has loaded. ...
    (comp.lang.php)
  • Re: timestamp at start of filling out form and form completion
    ... I'm assuming it would be by getting a timestamp at beginning ... a field on the form before the onsubmit method returns. ... all the content explicitly referenced in the HTML file has loaded. ... You can also use sessions. ...
    (comp.lang.php)
  • Re: capturing the time stamp in desired format
    ... I have a file and i am able to capture the arrival time. ... my desired output is 113000 ... I have a timestamp as 20060921094743 ...
    (comp.unix.questions)
  • capturing the time stamp in desired format
    ... I have a file and i am able to capture the arrival time. ... my desired output is 113000 ... I have a timestamp as 20060921094743 ...
    (comp.unix.programmer)