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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -