jquery - PHP doesn't receive $_POST -
i have problem php, i'm doing ajax post jquery. problem: php doesnt receive post, there no problems. i'm using last jquery version. ajax doesnt throw error, tried error:function(...) , console.log.
idcat number, example: 3 $nuevafila , other undeclared variables declared, aren't constructive.
php returns html because try html , receive ok
the ajax code one:
$.ajax({ cache:false, type:'post', url:'admin/categoria_ajax_ad', data: {id: idcat}, success: function(htmlfila) { var nfila=$cfilas.find(".fila").size()+1; $nuevafila.html(htmlfila); $nuevafila.appendto($cfilas); }, });
try using datatype (xml, json, script, or html) setting parameter depending on return data type -
$.ajax({ cache:false, type:'post', url:'admin/categoria_ajax_ad', data: {id: idcat}, datatype : "string" success: function(htmlfila) { var nfila=$cfilas.find(".fila").size()+1; $nuevafila.html(htmlfila); $nuevafila.appendto($cfilas); }, });
Comments
Post a Comment