xxxx.php?ddd=ddd dosyasının çalışması gerekiyor.....
Şimdi ne varki bunda window.onbeforeunload bu işini görür diyeceksiniz ama asıl sorunumuz şu arkadaşlar
1- Browser komple kapatıldığında ( Çok önemli )
2- Browser daki ilgili sekme kapatıldığında ( Çok önemli değil ama olursa iyi olur )
3- All Cross Broswer ( En önemlisi bu )
Baya bir araştırma yaptım bir çok değişik kod buldum bayasını denedim test ettim ama istediğim sonuca bir türlü ulaşamadım....
Bazı bulduğum örnek kodlar......
window.onbeforeunload = exitCheck;
window.onunload = onCloseDoSomething;
function onCloseDoSomething()
{
alert("This is executed at unload");
}
function exitCheck(evt)
{
return "Any string here."}
</script>
<script type="text/javascript">
var message="If you have made any changes to the fields without clicking the Save button, your changes will be lost.";
function ConfirmClose(e)
{
var evtobj=window.event? event : e;
if(evtobj == e)
{
if (!evtobj.clientY)
{
evtobj.returnValue = message;
}
}
else
{
//IE
alert(e.clientX + ' * ' + e.clientY);
if (evtobj.clientY < 0)
{
evtobj.returnValue = message;
}
}
}
</script>
<script language="Javascript" type="text/javascript">
window.onbeforeunload = exitCheck;
window.onunload = onCloseDoSomething;
function onCloseDoSomething()
{
window.location="indexa.php?option=logout";
}
function exitCheck(evt)
{
window.location="indexa.php?option=logout";
}
</script>