close the browser
| From: | hadi | Date: | Tue, 24 Jun 2014 23:51:17 +0000 |
| Subject: | close the browser | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-323548@lists.php.net to get a copy of this message | ||
Finally after long research I decide to go with javescrip and ajax.
Here is the code for someone interest into it.
Thanks for your support all.
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></scr
ipt>
<script type="text/javascript" >
$(window).unload(function() {
$.ajax({
url:"test2.php",
type:"POST",
async:false, // so browser waits till xhr completed
success:function() {
alert("bye!");
}
});
});
</script>
<?php
echo "welcome\n";
?>
Attachment: [application/pkcs7-signature] smime.p7s
Attachment: [application/pkcs7-signature] smime.p7s