I’m new to xmlhttprequest, and I need a little help with cross origin requests.
I make a xmlhttprequest from web service, everything is going nice and smooth from my local host.
but when I’m running from the server I get cross-origin exception (that’s because the origin (site) and the web service are not located at the same location)…
I’ve tried to set the Access-Control-Allow-Origin to ‘*’ threw req.setRequestHeader function without success.
P.s I’m writing in javascript.
I’ll be glad for any help.
Well the answer is:
We can’t locate our client files in one server and make a httprequest to another,
for security reasons the browser blocks the request…
so the options are:
Enjoy