Hi I am developing a web app(timetrack) and need to do track of user's time spent on a page. Let us say A user was browsing addproduct.php page for 3 minutes and he left the browser to do some thing else (can be another work on his machine, or can be another work on that web app(timetrack), and he comes back to the addproduct.php after 20 mins ans spend 10 mins I need to calculate timing of his off-time of the addproduct.php and on-time here 20 mins is off-time and 10 + 3 = 13 mins on the addproducts.php this should be calculate N times and sent to Mysql DB...Can anyone give me javascript solutions a thought..
Thanks