0

I am looking for something like below (jQuery OnUserExit plugin):
http://archive.plugins.jquery.com/project/onUserExit

but as you see their web site is not working.

So where can I find that plugin or how can I write something like that with jQuery?

Please see this thread: Counting online users using asp.net

I need that plugin for fire Session_End in global.asax. -> referring to link upper answers.

So the code below is not useful for OnlineUsers Count(fire Session_End in global.asax):

<script type ="text/javascript" >
    function CloseWindow()
    {
       alert("You are closing the window.Fire Session_End using EndSession.ashx");
    }
    window.onunload=CloseWindow;
</script>

because when user has two or more of a web site open these function will remove that user from OnlineUsers by closing one of them.
but looking for a function that recognize all open browsers of that web site and fire by closing last one (others are close).

EDIT After Comments:
there are some web sites out there that can handel the other web sites online usesrs count with javascript.
how do these web sites work and how do they recognize OnUserExit.
for example one of their codes in my web site is like this :

document.write('<script language="javascript" src="http://www.Counter.com/c.aspx?t=stats&code=2562977&ref=' + escape(document.referrer) + '"></script>'); screensize=screen.width+'x'+screen.height;colors=(navigator.appName.indexOf('Microsoft')==0)?screen.colorDepth:screen.pixelDepth;if(colors=='undefined'){colors='5';};if(colors=='32'){colors='1';};if(colors=='24'){colors='2';};if(colors=='16'){colors='3';};if(colors=='8'){colors='4';};document.write ('<div align="center"><iframe scrolling=no width=125 height=110 border=0 frameborder=0 allowtransparency="true" src="http://engine.Counter.com/counter/xstat.aspx?t=sum1&code=2562977&rnd=' + Math.round(Math.random()*50000) + '&s=' + screensize + '&c=' + colors + '&ref=' + escape(document.referrer) + '&title=' + escape(document.title) + '" ></iframe></div>');

would you please give us some explain about these codes!

thanks in advance

Community
  • 1
  • 1
SilverLight
  • 19,668
  • 65
  • 192
  • 300
  • How do you handle users, using ASP.NET membership or something homegrown ? – Antonio Bakula Jun 06 '12 at 17:25
  • @Antonio Bakula hi,something homegrown and for OnlineUsers i am using this way -> http://stackoverflow.com/questions/10481351/counting-online-users-using-asp-net – SilverLight Jun 06 '12 at 17:26
  • your answer was nice in that thread, man. but where is that plugin? also can that plugin handle the situation upper? – SilverLight Jun 06 '12 at 17:49
  • plugin is in upper archive that you linked, you can download it but I don't know if it works on current jQuery version, I used it on one project in the past and it's working well (jQuery 1.4.2 is used on that site). – Antonio Bakula Jun 06 '12 at 17:50
  • http://archive.plugins.jquery.com/node/5448/release?api_version[]=10 – Antonio Bakula Jun 06 '12 at 17:52
  • Page not found :( would you please paste here! – SilverLight Jun 06 '12 at 17:57
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/12209/discussion-between-antonio-bakula-and-moonlight) – Antonio Bakula Jun 06 '12 at 18:12
  • I was worried about the license, because there is none in the source, but looking at jQuery plugins license, I thing that pasting it would be OK, so here is the link http://pastebin.com/download.php?i=S8UKXAaY – Antonio Bakula Jun 06 '12 at 18:38

0 Answers0