function getSomeInfo() { $.ajax({ type: 'get', // We are doing a GET url: 'get_some_info.php', // You make this dataType: 'json', // Its returning JSON cache: false, // Don't cache the result success: function(data, textStatus, jqXHR) { // Do something with data $('#status').html('done'); }, error: function(data, textStatus, jqXHR) { $('#status').html(textStatus); } }); }
Programming Tips - jQuery: do AJAX
Date: 2017sep25
Language: javaScript
Library: jQuery
Q. jQuery: do AJAX
A. I do not use the post() or get() methods because they don't
have an error callback. Its not so hard to use ajax().