What are the best cursor (mouse) tracking Javascript applications for web sites? To be stored in a database…
What are the best cursor (mouse) tracking Javascript applications for web sites? To be
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.