GIF89a php
Current File : /home/hencockfreshchic/public_html/app_old/js/sendReport.js
function sendReport(frnd_id,user_id)
{
	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)
      {
      	var x = document.getElementById("snackbar");
	      	$("#snack_msgg").html("Reported Successfully");
 			 x.className = "show";
  			setTimeout(function(){ x.className = x.className.replace("show", "Hello"); }, 3000);
      	
      }
      else if(this.responseText==3)
      {
      		var x = document.getElementById("snackbar");
	      	$("#snack_msgg").html("Already Reported");
 			 x.className = "show";
  			setTimeout(function(){ x.className = x.className.replace("show", "Hello"); }, 3000);
      }
      else
      {
      	var x = document.getElementById("snackbar");
	      	$("#snack_msgg").html("Failed to report.");
 			 x.className = "show";
  			setTimeout(function(){ x.className = x.className.replace("show", "Hello"); }, 3000);
      }	
	}
  };
  xmlhttp.open("GET","sendReport.php?frnd_id="+frnd_id+"&user_id="+user_id,true);
  xmlhttp.send();
}