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

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -