JQuery get/ajax call executes callback without waiting for response
Posted
by dannyroa
on Stack Overflow
See other posts from Stack Overflow
or by dannyroa
Published on 2010-05-11T23:06:16Z
Indexed on
2010/05/11
23:14 UTC
Read the original article
Hit count: 159
jQuery
|jquery-ajax
I'm having issues with my JQuery Ajax Call. The response is always null because the callback function is executed before the request to get_friends is completed. Is there anything I'm missing? Thanks in advance.
$('#btn_update').click(function() {
url = '/get_friends/';
$.get(url, {}, function(response){
alert(response);
});
});
© Stack Overflow or respective owner