I am debugging this ajax for quite a time now. I have this on my jQUery file:
$(\"#typeForm\").ajaxForm({ success : function(html){ alert(html);
I was having same problem with json_encode today. But after testing a lot I found the correct solution:
json_encode
In PHP to encode the array or string:
json_encode($array, JSON_HEX_QUOT | JSON_HEX_TAG);
In JS to decode the same:
var d = $.parseJSON(content);