jQuery Tutorial


jQuery Example


jQuery References


jQuery Ajax ajaxError() Event Reference


  jQuery Ajax Method References


Uses

jQuery ajaxError() method add to the function, when AJAX request begin than execute.


Syntax

$[selector].ajaxError([callback])

jQuery Ajax ajaxError() Method support following parameter.

Parameter Description
callback Callback is optional parameter. It is use to represents a function to be executed whenever effect is completed.
External File Create
(ajaxfile.html)
Write Down following code in ajaxfile.html file.
<html>
<body>
<p>Ajax is use to jQuery to open URL 
documents with in the documents</p>
<br />
<p>AJAX = Asynchronous JavaScript a
nd XML</p>
</body>
</html>

jQuery Ajax ajaxError() method Example

<script type="text/javascript"> 
$(document).ready(function(){
	$("button").click(function(event){
    	$("#msg1").load('ajaxfiless.txt');	
		});
    $("button").ajaxError(function(){
        $("#msg2").text("Error Page ! (ajaxfiless.txt not Found)");
    	});			
  });
<script>
Online Try This Code Your Self....   »

  jQuery Ajax Method References