JQUERY "is null or not an object" Error in ajax call in IE8 -
i using ajax call below:
$('#myform').submit(function(){ var form_data = $(this).serialize(); $.ajax({ url: "/mycontroller/myfuntion", data : form_data, type : "post", datatype : "json", success: function(data){ if(data.error_code==0) { //do } else { //do else } }, failure: function(){ //do } }); return false; }); the json being returned {"error_code":0,"msg":""}
this being returned function json_encode of php dont think there problem format. error in first if condition 'error_code' null or not object. works fine in chrome , ff. can tell me doing wrong??
Comments
Post a Comment