GIF89a
function sendMsgg(frnd_id,my_id,checksum) { var msgg=$("#msgg").val(); if(msgg=="") { alert("Enter message"); $("#msgg").focus(); return false; } if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (this.readyState==4 && this.status==200) { if(this.responseText==1) { $("#msgg").val(""); } else { window.location.href = ("profile.php?id="+frnd_id); } } }; xmlhttp.open("GET","sendMsgg.php?msgg="+msgg+"&frnd_id="+frnd_id+"&my_id="+my_id+"&checksum="+checksum,true); xmlhttp.send(); }