I need to make AJAX request for HTML content, but when I look into firebug it seems that request is downloading media files attached to requested html (images, CSS). How can I stop it? I need only plain text from PHP-genereted HTML.
$.ajax({
type: 'GET',
url: 'http://examplehost.com,
dataType: 'text',
cache: false,
success: function (data) {
// SUCCESS CODE HERE
},
error: function (xhr, type, error) {
// ERROR CODE HERE
},
complete: function() {
// ON COMPLETE CODE HERE
}
});
I also must have possibility to run functions when request is complete! Im using ZEPTO library, but its JQuery clone, so the functions are similar.