<?php
?>
<html>
   <head>
       <title> JQuery AJAX İşlemleri</title>
	   <script src="jquery.min.js">
	   </script>
	   <script type="text/javascript">
	        $(document).ready(function (){
				
				   $("#btn1").click(function(){
					  $.ajax({
						 type:"POST",
						 url:"PHPAjaxSayfasi.php",
						 data:{adi:"Mutlu",soyadi:"YAPICI"},
						 dataType:"HTML",
						 beforeSend:function(){$("#div2").html("<img src='zamanlama.gif'/>");},
						 success:function(sonuc){  
						                        $("#div2").hide();
												$("#div2").html(sonuc);
												$("#div2").slideToggle();
												},
						 error:function(){alert("AJAX Çalışmıyor");}
						  
					  });			   
					   
				   });
				
				
			});
	   
	   
	   </script>
   </head>
   <body>
       <div id="div1"></div>
       <div id="div2"></div>
	   <button id="btn1">Ajax İşlemini Çağır</button> 
   </body>
</html>