views:

94

answers:

1

What are the best cursor (mouse) tracking Javascript applications for web sites? To be stored in a database...

A: 

I don't know that there is a pre-packaged general solution to this problem one-click away.

I would recommend picking a good Javascript framework (my personal favorite is MooTools, but jQuery is nice too). Both of these libraries provide nicer ways of handling mouse events in a cross-browser compatible manner.

My advice: Keep a queue of mouse events that you constantly push to a server via AJAX calls. The server-side script that answers the AJAX request can push the data into a database of your choosing.

Take a look at this nice MooTools library for handling advanced mouse gestures to get a good feel of how you might accomplish the mouse movement recording: Moousture.

Edit: After a little more Googling I also came across a MooTools Flashlight Effect which does almost exactly what you want. Instead of updating the position of the flashlight based on mouse movement, you would store the coordinates in a queue that gets pushed to a server later.

awesomo