views:

29

answers:

0

Is there a more elegant way of passing a variable after performing an Ajax request (JS->PHP) other than printing the results?

Printing can get a little messy and also doesn't offer a lot of flexibility in terms of the return value (e.g. hard to pass objects).

Also, I had this random space that was printed in one of my Ajax request callbacks and I could not figure out where it came from. This problem would not exist with passing serialized variables or something like that, right?

Thanks in advance!