同时运行两个 CGI
在我的表单 onbutton 提交上,发生以下事件:
1)调用 CGI 上传文件
2)调用 Javascript/Ajax 函数,打开对另一个 CGI 的请求,并应该从那里接收更新的值。然而,与 Ajax 通信的 CGI 似乎没有响应 Ajax 请求。
我的问题是可以同时运行两个 CGI 吗?
On my form onbutton submit following events takes place:
1) CGI is called which uploads the file
2) Javascript/Ajax function is called which opens a request for another CGI and is supposed to receive updated values from there. However, it seems that the CGI with which Ajax is communicating is not responding to Ajax requests.
My question is that is it possible to run two CGIs simultaneously?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,没有理由不能同时运行 2 个 cgi,另一方面,有无数种方法可以让它变得麻烦,我个人最喜欢的是使用有状态会话 bean。
说真的,我认为这可能是由于按下提交按钮实际上会转到另一个页面,该页面破坏了 AJAX/Javascript 环境,因此不再对第二个 CGI 做出反应。
现在这是一个猜测,因为现在,当你按下一个按钮时,可能会发生很多不同的事情,但我认为值得检查一下。
Yes, there is no reason that you cannot run 2 cgi's simultaneously , on the other hand there are countless ways to make it troublesome with my personal favorite being the use of stateful session beans.
Seriously, I think it is probably caused by the fact that by pressing the submit button you are actually going to another page which destroys the AJAX/Javascript environment so there is nothing left anymore to react on the 2nd CGI.
Now this is a guess, because nowadays, so many different things can happen when you press a button, but I think it is worth checking this out.