var msg;
$.get("my_script.php", function(text) {
msg = text;
});
If for some reason the response is text, the remote script might be changing the content-type to something like JSON, and thus jQuery tries to parse the string before outputting to you.