[thelist] xmlHttp POST

Richard Livsey richard at livsey.org
Thu Jan 13 07:46:00 CST 2005


This just cost me a couple of hours trying to work out why posting data 
wasn't working with XMLHttpRequests.

<tip type="POST data and XMLHttpRequest" author="Richard Livsey">
The Content-type of XMLHttpRequest defaults to text/xml.

If you are trying to post data in the format 'foo=bar', make sure you 
set the content type to application/x-www-form-urlencoded otherwise it 
will not be avaliable in $_POST (or the equivalent in whatever server 
side language you are using).
</tip>

<typ type="Cross browser XMLHttpRequest " author="Richard Livsey">
IE7 XML extras by Dean Edwards provides a nice cross browser interface 
to XMLHttpRequest

http://dean.edwards.name/IE7/src/?ie7-xml-extras.js
</tip>

-- 
R.Livsey
www.livsey.org



More information about the thelist mailing list