javascript - jQuery Post Not Working in OS X Chrome -
i have following code:
$.ajax({ type: 'post', url: 'mylink.com/coupon2.php', crossdomain: true, data: '{"some":"json"}', datatype: 'json', success: function(responsedata, textstatus, jqxhr) { //$( "#coupon_code" ).html("coupon code: " + responsedata.data.code); //var value = responsedata; //var json = json.parse(responsedata); $( "#coupon_code" ).html("coupon code: " + responsedata.data); }, error: function (responsedata, textstatus, errorthrown) { $( "#coupon_code" ).html( 'post failed. ' + errorthrown + ', ' + responsedata ); } }); it works fine in chrome , firefox on windows, doesn't post or subsequently return in chrome on os x. why be?
the issue not browser or os specific, strictly associated attempting make cross origin requests secure connection insecure connection. when testing code on windows pc, wasn't connected initial site via https. however, when tested on mac, connected initial site via https, , attempting post non-https url. why post functioned on pc, , subsequently failed on mac.
Comments
Post a Comment