jquery post() response not comparing to string -
in advance help, i'm having problem response of post(), when trying compare string, code is:
$.post( "cand.php?id=<?php echo $user_id; ?>", { accion: "eliminar"}) .done(function(data) { console.log ($.type(data)); console.log (data); console.log (data === 'ok'); });
and console answers are:
string
ok
false
as cas see data var string value of "ok" when compare string, it's false
Comments
Post a Comment