English 中文(简体)
通过xml 查询
原标题:cross origin request via xmlhttprequest

I m new to xmlhttprequest, and I need a Little help with cross origin request.

我从网络服务中抽取一个xmlhttprequest,所有东西都从我的当地东道方 n开。

但是,当Im从服务器上运行时,我会遇到交叉的例外情况(这是因为来源(现场)和网络服务并不在同一地点。

我试图将准入-Control-Allow-Origin设定为rew重新q.setRequest 标题没有成功。

P.s I m written in javascript.

我很高兴得到任何帮助。

最佳回答

答案是:

We can t locate our client files in one server and make a httprequest to another, for security reasons the browser blocks the request...

因此,备选办法如下:

  1. To locate both client & server files in on the same server.
  2. There couple ways to manipulate the server which include changing scripts in the server files (really not recomended for beginners... )

休闲

问题回答

暂无回答




相关问题
The proper way to handle popup closing

I m looking for close event for popup. I ve found one for XUL, but I need it for HTML. Popup has closed property. >>> var popup = open( http://example.com/ , popup , height=400,width=500 )...

Are cross-domain favicons a security risk?

I have a site of user-submitted news articles, and an idea I had for a feature was to grab the favicon on the target site to display along with the link. The methodology for grabbing the favicon ...

Javascript security / cross scripting on same server

Have some Javascript that I need to work via the following: ://localhost ://servername :/www.domainnamefortheserver.com When I run the script from http://servername with an IFRAME referencing the ...

AS3进入其他领域

我有一台AS3冲锋枪,用于搜索点和展示一些结果。 它在当地运作,但当帆船在服务器上时,它就能够进入角。 我曾尝试过安全......。

Error handling in getJSON calls

How can you handle errors in a getJSON call? Im trying to reference a cross-domain script service using jsonp, how do you register an error method?

Sending data using Jquery Iframes

I want to send large amounts of data to and from 2 domains (e.g. Cross Domains) I was told the best way to do this is to use IFrames. My question is... How do I go about doing this. Is this what ...

热门标签