作者:丙尔金开发_448 | 来源:互联网 | 2023-07-07 18:18
Ivegot2ajaxrequestsononepage.Iranfirstrequestandseparatelystartsecondone.Butsecon
I've got 2 ajax requests on one page. I ran first request and separately start second one. But second one stops working after the first has been run. And continue when first is over. First requst take long time - something like 30 - 60 seconds and in this time I need second request to show logs what happens with first request. I try to use async: true but it's not help me.
我在一个页面上有2个ajax请求。我跑第一个请求并分别开始第二个请求。但第二个在第一个运行后停止工作。当第一次结束时继续。首先需要花费很长时间 - 例如30-60秒,在这段时间我需要第二个请求来显示第一个请求会发生什么。我尝试使用async:true但它对我没有帮助。
Here it's my code
这是我的代码
and I call first ajax request in this way: getConn('main.php'); from function when press button. Second request it's running, but not show respons before first request complete.
我用这种方式首先调用ajax请求:getConn('main.php');从功能按下按钮。第二个请求它正在运行,但在第一个请求完成之前没有显示响应。
I wil attach image from firebug. main.php - is request that take longer time. log.php - is the logger that is blocked.
我将附上来自萤火虫的图像。 main.php - 需要更长时间的请求。 log.php - 是被阻止的记录器。
Would really appreciate some pointers to where I'm going wrong
真的很感激我指出错误的地方
1 个解决方案