Organizational Research By

Surprising Reserch Topic

jquery getjson access control allow origin issue


jquery getjson access control allow origin issue  using -'javascript,jquery,json,xmlhttprequest,access-control'

I'm jusing jQuery's $.getJSON function to return a short set of json data.

I've got the JS sitting on a url (http://example.com).  I didn't realize, but I was accessing as (http://www.example.com) which kept the JSON from loading.  I followed through console and found that XMLHttpRequest couldn't load due to Access-Control-Allow-Origin.

Now, I've read through, alot of sites just said to use getJSON and that would be the work around, but obviously it didn't work.  Is there something I should change in the headers or in the function?

Help is greatly appreciated it.
    
asked Oct 7, 2015 by akasati02
0 votes
9 views



Related Hot Questions



Government Jobs Opening


...