简体   繁体   English

在 HTA 应用程序中使用 XDomainRequest 对象

[英]Using XDomainRequest Object in HTA application

I have an HTA aplication, which gets some data using through ajax call.我有一个 HTA 应用程序,它通过 ajax 调用获取一些数据。 I satrted to use XMLHttpRequest for this.我开始为此使用 XMLHttpRequest。 This method was giving me the desired result, but it was coming with a pop up before sending a request as shown here .这种方法是给我想要的结果,但它与一个即将发送请求如图所示之前弹出这里

So as suggeted in the previous link, i tried using XDomainRequest Object .因此,正如上一个链接中所建议的,我尝试使用XDomainRequest Object But this is giving me error on xhr.open() method call;但这在 xhr.open() 方法调用上给了我错误; as i think the protocol for HTA application is file:;因为我认为 HTA 应用程序的协议是 file:; while XDomainRequest only supports ttp: and https: protocol.而 XDomainRequest 仅支持 ttp: 和 https: 协议。

Is there any workaround where i can get data using a cross domain call without intimating user on IE 8.是否有任何解决方法可以使用跨域调用获取数据,而无需在 IE 8 上暗示用户。

Thanks.谢谢。

It's not clear where the requested file is located at.目前尚不清楚请求的文件位于何处。

When it's accessible via HTTP/HTTPS(no matter which domain) you may use WinHTTPRequest当它可以通过 HTTP/HTTPS 访问时(无论哪个域),您都可以使用WinHTTPRequest

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

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