I\'m looking for a way to display a message to the user if he leaves my site after only viewing one page.
I found this (http://www.pgrs.net/2008/1/30/popup-when-leaving-
There are some cases where this can be very useful and not having this feature will be annoying. One of the applications I developed for a client required users to input a lot of data on a page (close to 25 fields). I know it would have been better and more usable if the form was broken into more pages, but that's not the point here. There were instances where employees (mostly not very savvy computer users) entered data but for whatever reason left the page without submitting (accidentally, I am sure), resulting in frustration. I was happy to do window.onbeforeunload
in that case.