[jQuery] Re: jQuery + PHP Form Validation

2009-03-27 Thread James
Currently, I believe so. Prior to that was probably using XML (the intent of AJAX's XMLHttpRequest), but it required a lot of work needing to drill down to reading the content, and the response size of XML was fairly large due to all the XML tags required. JSON doesn't use such structural tags, so

[jQuery] Re: jQuery + PHP Form Validation

2009-03-27 Thread Link
Just out of curiosity, is this typically the best way? On Mar 27, 7:46 pm, James wrote: > The best way is to use JSON as the dataType. > In PHP, all you need to use is the json_encode() function to convert a > PHP array to JSON. It's like an easy way to pass back an array full of > data back to

[jQuery] Re: jQuery + PHP Form Validation

2009-03-27 Thread James
The best way is to use JSON as the dataType. In PHP, all you need to use is the json_encode() function to convert a PHP array to JSON. It's like an easy way to pass back an array full of data back to the client that you can manipulate as regular Javascript variables. For example, your PHP code wou