Ah, I think I see the problem. XmlHttpRequest requires that your POST
data be formatted as some sort of XML (like XHTML).  The thing is,
you're sending the data as part of the URL, no?  That's closer to a GET
request.

If your server side process is designed to receive small chunks of data
this way, there really no need to use POST, because the URL won't show
up in the address bar anyway.

An example of passing data via POST with XmlHttpRequest:

var data = "<mydata>";
data += "<param>";
data += "<name>UserID</name>";
data += "<value>31337</value>";
data += "</param>";
data += "</mydata>";

my_XmlHttpRequest.open("post","/cgi-bin/my_script.cgi");
my_XmlHttpRequest.send(data);

Of course, your CGI will have to know how to parse the XML and make
sense of it.

scottandrew

Michael Pemberton wrote:
> 
> I tried just using the same string that I send to the java equiv code but it gave me 
>some message about not
> being able to convert it.
> 
> Is there anywhere I can find out a sample of what it is actually expecting?  At the 
>moment, I just use
> astring containing the content: "name=value&name=value..."
> 
> I have no idea how this would be translated to XML.  Keeping in mind that I use the 
>same data value for all
> browsers.  Any conversion needs to be dome after this data has been passed to the 
>_readURLData method.


-- 
scott andrew lepera
[EMAIL PROTECTED]
web stuff: www.scottandrew.com
music stuff: www.walkingbirds.com

JavaScript is a lot like C++, without all that useless stability.

_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev

Reply via email to