<script type="text/javascript">
var clicked = false;
function CheckBrowser()
{
debugger;
if (clicked == false)
{
}
else
{
clicked = false;
}
}
function bodyUnload()
{
debugger;
if (clicked == false)
{
debugger;
var request = GetRequest();
request.open("GET", "Logout", true);
request.send();
}
}
function GetRequest()
{
debugger;
var request = null;
if (window.XMLHttpRequest)
{
request = new XMLHttpRequest();
}
else
{
request = new ActiveXObject('MSXML2.XMLHTTP.3.0');
}
return request;
}
and add this in body tag
onunload="bodyUnload();" Onclick="clicked=true;