我想使用下面的代碼執行嵌套的AJAX調用。嵌套調用似乎不起作用。我做錯了什麼?JQuery - 嵌套AJAX
$.ajax({
type: 'GET',
url: "/public/customcontroller/dosomething",
cache: false,
dataType: "html",
success: function(html_input)
{
$.ajax({
type: 'GET',
url: "/public/customcontroller/getjobstatus",
cache: false,
dataType: "html",
success: function(html_input){
alert(html_input);
}
});
}
});
取決於,是第一次通話成功嗎?否則'success'中的函數永遠不會被調用。 – 2010-03-30 19:58:11
我會在內部函數中調用'html_input'不同的東西 – 2010-03-30 19:59:47
第一次調用成功。我在內部函數中將html_input重命名爲html_response ..仍然沒有運氣.. – Jake 2010-03-30 20:04:29