简体   繁体   English

Javascript 错误 XMLHttpRequest 无法加载

[英]Javascript error XMLHttpRequest cannot load

Im currently working on an online-shop(System is Gambio) and I got Pop-Up images in a lightbox.我目前在一家网上商店工作(系统是 Gambio),我在灯箱中看到了弹出式图像。 But it doesn't work when Im trying to open the pictures.但是当我试图打开图片时它不起作用。

In Chrome console I got the error messages:在 Chrome 控制台中,我收到了错误消息:

XMLHttpRequest cannot load http://zoobedarfxxl.de/request_port.php?module=Attributes&action=attribute_images&options_ids=&values_ids= . XMLHttpRequest 无法加载http://zoobedarfxxl.de/request_port.php?module=Attributes&action=attribute_images&options_ids=&values_ids= Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.对预检请求的响应未通过访问控制检查:请求的资源上不存在“Access-Control-Allow-Origin”标头。 Origin is therefore not allowed access.因此不允许访问 Origin。

and

XMLHttpRequest cannot load h.ttp://zoobedarfxxl.de/request_port.php?module=LightboxGallery&id=15066&XTCsid=565bb63ec1814f33dccf6af1c422c1f4. XMLHttpRequest 无法加载 h.ttp://zoobedarfxxl.de/request_port.php?module=LightboxGallery&id=15066&XTCsid=565bb63ec1814f33dccf6af1c422c1f4。 Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.对预检请求的响应未通过访问控制检查:请求的资源上不存在“Access-Control-Allow-Origin”标头。 Origin is therefore not allowed access.因此不允许访问 Origin。

and

VM5415:1 Uncaught TypeError: Cannot read property 'replace' of undefinedButtonProductImagesHandler.gallery_init_binds
@ VM5415:1(anonymous function) @ VM5415:1n.extend.each 
@ gm_javascript.js.php?cPath=8577&products_id=15066&XTCsid=565bb63…&XTCsid_na…:8n.fn.n.each @ gm_javascript.js.php?cPath=8577&products_id=15066&XTCsid=565bb63…&XTCsid_na…:8(anonymous function) 
@ gm_javascript.js.php?cPath=8577&products_id=15066&XTCsid=565bb63…&XTCsid_na…:10j @ gm_javascript.js.php?cPath=8577&products_id=15066&XTCsid=565bb63…&XTCsid_na…:8k.fireWith 
@ gm_javascript.js.php?cPath=8577&products_id=15066&XTCsid=565bb63…&XTCsid_na…:8x @ gm_javascript.js.php?cPath=8577&products_id=15066&XTCsid=565bb63…&XTCsid_na…:10b 
@ gm_javascript.js.php?cPath=8577&products_id=15066&XTCsid=565bb63…&XTCsid_na…:10

I searched the problem a little bit, but I was not able to figure how to solve the problem.我搜索了一点问题,但我无法弄清楚如何解决问题。 Has anyone some Hints oder Ideas how to solve this?有没有人有一些提示或想法如何解决这个问题?

Greetings Tim问候蒂姆

You are getting a CORS (Cross Origin Resource Sharing) issue.您遇到了 CORS(跨源资源共享)问题。 Have a look on StackOverflow questions with CORS tag.使用 CORS 标签查看 StackOverflow 问题。

For security reasons, browsers restrict cross-origin HTTP requests initiated from within scripts.出于安全原因,浏览器会限制从脚本内发起的跨源 HTTP 请求。

There are restrictions while making ajax request to the server other than the document's domain.向文档域以外的服务器发出 ajax 请求时存在限制。

The reason of error is " Access-Control-Allow-Origin " header is not supplied by other server.错误的原因是其他服务器未提供“ Access-Control-Allow-Origin ”标头。

Resources:资源:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM