javascript - IE8: Access denied -
i trying access , api using jquery/post not working in ie8. throwing access denied error in ie8 only.
js code:
var url = 'http://somecomp.cartodb.com:80/api/v1/map?map_key=xxxxxxxxxxxxxxxxxxxx&stat_tag=api'; var data = //some long data of length greater 3000 $.ajax({ crossorigin: !0, type: "post", method: "post", datatype: "json", contenttype: "application/json", url: url, data: json.stringify(data), success: function(a) { console.log('success'); }, error: function(a) { console.log('error'); } })
if add ?callback=? @ end of url, still fires error callback statustext: 'success' , code: 200
here full code: http://textuploader.com/ato0w
change datatype
jsonp
allow make cross-domiain requests. work get
requests.
if you're using cors accessing cross-origin resource, try add following line:
$.ajax({ crossdomain: true, // replace "crossorigin: !0;" });
if not working you, try add following line above $.ajax()
call.
jquery.support.cors = true;
Comments
Post a Comment