0

I'm trying to do a fairly simple load function with Jquery (at least I think it is), but it simply isn't loading anything.

On this page here (http://new.visibilitysoftware.com/careers/), I am trying to load the div#center-stage from here: http://www.vspublic.com/VSCareers/Careers.aspx. I have tried it with and without the /careers.aspx. I have also tried it with #center-stage and #center-stage.content as jquery parameters for the function.

I'm sure it's something obvious, but I simply can't find it. I appreciate any help. Thanks

4

2 回答 2

1

you will not be able to load data from external site because The Same Origin Policy enforced by the browsers.

Workaround for this is to implement "Access-Control-Allow-Origin", "*" header in the response from http://www.vspublic.com/VSCareers/Careers.aspx

于 2013-05-28T04:58:59.490 回答
0

Took a quick look at the page. This is happening due to restrictions due to same origin policy.

XMLHttpRequest cannot load http://www.vspublic.com/VSCareers/Careers.aspx. Origin http://new.visibilitysoftware.com is not allowed by Access-Control-Allow-Origin.

One way to use it is JSONP. I know an example would be helpful. Will add it as soon as I get some time.

于 2013-05-28T04:59:07.700 回答