Jason Morehouse wrote:
Just playing around with xmlhttp at the moment. I was just wondering if
there is any reason (browser compatibility etc) the response data has to
be formatted in xml, or can I send csv or whatever else if the handler
is up for it?
There is both a responseText and a responseXML property so if you don't
want to use XML you can receive other text as needed but need to be
aware that responseText doesn't pay attention to encodings so you should
send the text as UTF-8 from the server if you need characters in
responseText that are outside of ASCII. And of course with
sending/receicing XML you get it parsed and can access it in responseXML
using the DOM while for csv you need to write your own parsing routine
first.
--
Martin Honnen
http://JavaScript.FAQTs.com/