knowing when a user left page
i'm faced with a small problem.
i want to know when a user left my page.
in order to do so i call onunload function f.
in this function i load a image from my server and this way get a log in the iis.
here's the loading image code:
var myImage = new Image();
myImage.src = "http://192.168.10.65:8080/servlet1";
the problem is that the image is loaded only when i switch a page, when i do refresh or back it does not call it.
(the image is not cached or it would have not called for it every time i switch pages).
if i'll add a aleft in the function it will be called every time.
why is that?
thanks, but then how could i know when a user left my page ???
my idea was to call something (image) and then view the iis log.
it works fine on links from the page but not on window closing or using back and forward.
any ideas how could i know that a user had left my page???
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)