首先我加载PHP页面然后从JAVA脚本调用第二个PHP和张贴一些变量和操作功能一个... Java函数调用首先AJAX请求是指第一个AJAX请求仍然是工作......AJAX请求
现在在调用其他JAVA脚本,创建另一个AJAX请求其称之为第三PHP其生成地图API XML数据的第二个PHP函数一个...意味着第二AJAX request..but,因为第一个请求仍然没有失败完成...我该如何处理?这AJAX调用PHP和PHP的呼叫第二AJAX请求?...
请帮我....
看我的要求,按您的例子,因为我的代码太长,张贴和格式这里每堆栈格式
首先,我在浏览器直接加载ajax1.php。
现在我致电新AJAX请求
$.ajax('/ajax2.php', function(data2){
// But the ajax2.php having Call another AJAX request for ajax3.php which retrive XML Data genereted from mysql and create Google MAP
$.ajax('/ajax3.php', function(data3){
// I need to display the ajax2.php Generated MAP to DIV created by ajax1.php
// Whene I call ajax2.php directy from browser url it AJAX ajax3.php runs and gerete MAP perfectly
// But I call ajax2.php through ajax1.php AJAX request it dosen't create the ajax3.php AJAX request
});
});
总之我致电新AJAX请求,但首先AJAX请求调用另一个二AJAX请求。它生成MAP。
document.getElementById("ntfs").innerHTML=xmlhttp.responseText;
// This above code is not working but I write like
document.write(xmlhttp.responseText);
//This above Code works perfect, but it create new document I can't fill to DIV.innerHTML
为什么?发生这种事?