Hi all, I've been working with jQuery for a few weeks now (still a noob so :), and I'm a bit confused about getting information from a php file. Basically :
MY JAVASCRIPT FILE: $.get("phpfile.php", {param:param...}, function(data) { if(data == "ok") { ...do stuff... } }) MY PHP FILE: <?php echo "ok"; ?> In this dumb example, I'm unable to match the 'data' returned variable with the value I assigned to it in php (I can't manage to enter my 'do stuff'), yet its value is 'ok' if I display it. I have no problem to retrieve html code from php and inject it in my pages, but I can't test it as a regular javascript string. What's wrong in this ? What have I missed about the 'data' format ? Do I have to 'cast' data to a javascript string (and if so, how ?) ? And finally, sorry about my english, I'm french :-) thanks Flo