I'm using jQuery to make ajax requests. The data is getting to PHP nicely, but the response isn't getting back to javascript properly. Somehow there is a space before the response. I know this because Firebug says so and my code doesn't work because the space is there. When I expect there to be a space it works fine. Any ideas as to what could be adding the space?
Here is my ajax function:
function my_ajax (aurl, adata, aretfunc) {
$.ajax({
type: "POST",
url: aurl,
data: adata,
success: function(msg) {
eval(aretfunc+'(msg);');
}
});
}