This is an example of logging key and mouse activity on a web page. The activity is logged and then submitted with the form. Normally the large textarea would be hidden so users' cannot see what's going on (add style="display:none" to the textarea), or could be storred in a javascript variable and submitted via a js linked to the submit button. The script was adapted from an example found on the web, unfortunately I've lost the link to the original source :( ... "view source" will show you that it is all very straightforward. This isn't "Valid XHTML 1.0 Strict" by the way as I've avoided the gymnastics of not using "name=" (it is "Transitional" though), but it works OK in both IE (7 tested) and FF (2.0 tested).

Far more than this could be done (X,Y mouse positions and timing, mouse X-Y positions and timing for example. Sounds useful for usability analysis actually.

All keystrokes and moust ups/downs are logged regardless of which element is focused. Some elements have special mouse events registered too.


Type something: (tracks mouse out/in and clicks)
(tracks mouse out/in and clicks)

Cheers - Yvan - Malignity.net