Ajax request returns 0x80004005 (NS_ERROR_FAILURE)
I want to make an request from
webapp.mysite.net
to
mysite.net/request.php?param=...
The response is plain text. But I keep getting an error
The async
param must be set to false
.
I assume my request is called cross-domain request
. So I setu开发者_JS百科p a simple php proxy to solve the problem, but this does not work for me. It gives me an emtpy response.
I try to solve this problem for about two days now but without success. Any ideas?
Ok,
I had a similar problem when making ajax Requests to the same domain and same level.
Don't make ajax request to
http://www.site.com
use
http://site.com
No idea why this is triggering this error, maybe somebody else will have this problem.
I don't know whether the smsflatrate.net supports JSONP but this is what you'd have to use to get cross domain JSON request. But if I were you I probably wouldn't post your appkey and in public like you just did.
To use a proxy you have to have it on the same domain as you serve your HTML from, or use JSONP.
Also, why do you use async: false with callbacks? The only effect will be completely blocking the browser while the request takes place. And JSONP or any cross-domain requests can only be asynchronous.
精彩评论