在生产期间,未显示xmlHttp.responseText的AJ​​AX结果。 [英] During production the AJAX result from xmlHttp.responseText was not displayed.

查看:65
本文介绍了在生产期间,未显示xmlHttp.responseText的AJ​​AX结果。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发(调试)期间,该站点运行良好,但是当我从调试和测试发布到生产中时......所有的AJAX都没有执行.. 没有显示xmlHttp.responseText的结果。


我添加了一个警报,以检查脚本是否被调用。显示警报。

During development (debugging) the site works well but when I release from the debugging and test into production.. All the AJAX was not performed.. the result from xmlHttp.responseText was not displayed.

I added an alert in order to check if the script was called. The alert was displayed.

推荐答案


在开发(调试)期间,网站运行良好,但是当我从调试中释放时并测试生产..所有的AJAX都没有执行.. 没有显示xmlHttp.responseText的结果。


我添加了一个警报以便检查脚本是否被调用。警报已显示。
During development (debugging) the site works well but when I release from the debugging and test into production.. All the AJAX was not performed.. the result from xmlHttp.responseText was not displayed.

I added an alert in order to check if the script was called. The alert was displayed.



如果你发送了一些代码,那么最好指出你的错误。

所以用适当的代码标签发布相关代码,专家们在这里找出你的问题以及你的解决方案。


亲切的问候,

Dmjpro。

If you sent some code then it would be better to point out your errors.
So post the relevant code with proper code tag, the experts are here figure out your problems and as well as your solutions.

Kind regards,
Dmjpro.


Heya,Eros。


我有时犯的错误是忘记更改AJAX请求的URL。例如,当我在我的开发机器上测试时,我从localhost获取数据,但是一旦脚本上线,我必须记住使用部署服务器的地址。


As一个旁注,我曾经在eBay上遇到过令人尴尬的失礼。为了节省带宽,我在拍卖说明中为我的所有图像使用了file:// URIs,但是在保存说明之前我忘了更改它们。当然,它在我的电脑上看起来很好!直到拍卖结束前2小时我才注意到!糟糕:
Heya, Eros.

A mistake that I sometimes make is forgetting to change the URL of the AJAX request. For example, when I test on my development machine, I fetch data from localhost, but once the script goes live, I have to remember to use the address of the deployment server.

As a sidenote, I once had an embarrassing faux pas on eBay. To save bandwidth, I used file:// URIs for all of my images in my auction description, but then I forgot to change them before I saved the description. Of course, it looked fine on my computer! I didn''t notice until 2 hours before the auction ended! Oops :


Javascript / AJAX代码:ajax.js
展开 | 选择 | 换行 | 行号


这篇关于在生产期间,未显示xmlHttp.responseText的AJ​​AX结果。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆