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

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

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