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

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -