jquery - Cross-Domain scripting working in every browser except IE8 & 9 -


i have site @ myapp.myurl.com making ajax request api.myurl.com. understand considered "cross-domain." don't understand why ajax call works in every browser except ie8 , ie9.

here's code details removed.

 $.ajax({     type: "post",     datatype: "json",     headers: header,     data: data,     url: "api.myurl.com/getdata",     success: function (data) {     //dostuff     } }); 

is there can do?

here's response when run script manually in ie8

{readystate: 0, responsejson: undefined, status: 0, statustext: "no transport"} 

here's response when run script manually in chrome

object {readystate: 1, getresponseheader: function, getallresponseheaders: function, setrequestheader: function, overridemimetype: function…} 

and has correct json response.

ie 8 , 9 have partial cors implementation. use non-standard object called xdomainrequest to cross-domain requests.

you may need write special code it, or use special jquery plugin.

see other post describes similar issues. cors jquery , xdomainrequest in ie8/9


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -