google chrome cannot identify jquery-ajax function data result -
google chrome cannot identify jquery-ajax function data result -
i'm trying action based on jquery-ajax function result here illustration code:
function test(){ $.ajax({ type: 'post', url: 'testing.php', success: function(data) { if($.trim(data) == 'ok' ) alert('success , ok'); else alert(data) } }) }
it works fine in firefox , "success ok" alert, in chrome "ok" alert. why doesn't $.trim(data) == 'ok'
work in chrome when info equal "ok" ?
jquery ajax google-chrome
Comments
Post a Comment