Why my JQuery ajax functions waits indefinitely
I have a jQuery ajax function calls to load the data. When I am testing in
Chrome sometimes it doesn't call the request complete function and
sometimes it works. Please let me know what could be the reason.
var request = $.ajax({
url: data_url,
type: 'post',
data: ""
});
request.done(function(result)
{
console.log("Done");
}
The URL and everything are correct because it works sometime when I click
refresh. Is it something that I need to pass some end code when I am
sending the stream from browser?
In server side, I am using PHP echo function to send encoded JSON.
No comments:
Post a Comment