December 2013
Intermediate to advanced
384 pages
9h 54m
English
When you send an AJAX request to the server, the server responds with response data. There are four main types of response that you will be working. These response data types are script, text, JSON, and XML/HTML.
In JavaScript, the response data is available in the response and responseText attributes of the XMLHttpRequest object once the request completes. In jQuery, the response data is passed as the first parameter to the AJAX handler function you define.
The script and text are handled pretty simply by the .load() and .getScript() methods. JSON and XML/HTML can be a bit more complex.
$.getScript("scripts/ajax/newLibray.js", function(script, ...
Read now
Unlock full access