---------- 20190606 // Assign handlers immediately after making the request, // and remember the jqxhr object for this request var jqxhr = $.get( "example.php", function() { alert( "success" ); }) .done(function() { alert( "second success" ); }) .fail(function() { alert( "error" ); }) .always(function() { alert( "finished" ); }); // Perform other work here ... // Set another completion function for the request above jqxhr.always(function() { alert( "second finished" ); }); Examples: Request the test.php page, but ignore the return results. $.get( "test.php" ); Request the test.php page and send some additional data along (while still ignoring the return results). $.get( "test.php", { name: "John", time: "2pm" } ); Pass arrays of data to the server (while still ignoring the return results). $.get( "test.php", { "choices[]": ["Jon", "Susan"] } ); Alert the results from requesting test.php (HTML or XML, depending on what was returned). $.get( "test.php", function( data ) { alert( "Data Loaded: " + data ); }); Alert the results from requesting test.cgi with an additional payload of data (HTML or XML, depending on what was returned). $.get( "test.cgi", { name: "John", time: "2pm" } ) .done(function( data ) { alert( "Data Loaded: " + data ); }); Get the test.php page contents, which has been returned in json format ("John","time"=>"2pm" ) ); ?>), and add it to the page. $.get( "test.php", function( data ) { $( "body" ) .append( "Name: " + data.name ) // John .append( "Time: " + data.time ); // 2pm },