We help IT Professionals succeed at work.

time modified exit confirm box javascript

ProjectZIG
ProjectZIG asked
on
we already have a confirm box pop up on navigation away from the page, but we need different messages based on time spent on the site. For instance if the user is on the page from 0-5 minutes and navigates away, the confirm message is "you have been on the site for less than 5 minutes", 5-10 minutes and navigates away "you have been here for almost 10 minutes", and another from 10 -15 minutes.
Comment
Watch Question

Chief Technology Ninja
Distinguished Expert 2019
Commented:
Hi ProjectZIG,
You can refer to : http://www.sivamdesign.com/scripts/dwld/vis_time.txt
Regards,
Chinmay