469,898 Members | 1,574 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

Using XMLHTTP to post form data

Hi,

I've got a web form that needs to submit its data in a number of
different directions.

I was hoping to use XMLHTTP to post it to two external service providers
EROI and Salesforce)

So far I've just been working on the EROI part, and while I don't get
any errors, it doesn't appear to be working, as no new data is showing
up in EROI.

Where xmlhttperoi is the variable storing my long string of fields and
values, this is my code:

set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
xmlhttp.Open
"POST","http://emailer.emailroi.com/multisubscribe.ice",false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-
urlencoded"
xmlhttp.send xmlhttperoi
Response.ContentType = "text"
Response.Write xmlhttp.responsexml.xml
Set xmlhttp = nothing
Anyone notice any obvious flaws in there? (Server is w2003, IIS6)

When I had "Response.ContentType = "text"" set to "text/xml" it would
return an xml syntax error on the "@" of an email address in the post
string. Could that be the culprit? I don't think EROI is receiving this
as XML, so I'd doubt it, but I'm sort of dumb most of the time.
Thanks.
Jan 13 '07 #1
1 4026

"Pupkin" <sp*******@dorrk.comwrote in message
news:MP************************@news.giganews.com. ..
Hi,

I've got a web form that needs to submit its data in a number of
different directions.

I was hoping to use XMLHTTP to post it to two external service providers
EROI and Salesforce)

So far I've just been working on the EROI part, and while I don't get
any errors, it doesn't appear to be working, as no new data is showing
up in EROI.

Where xmlhttperoi is the variable storing my long string of fields and
values, this is my code:

set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
xmlhttp.Open
"POST","http://emailer.emailroi.com/multisubscribe.ice",false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-
urlencoded"
xmlhttp.send xmlhttperoi
Response.ContentType = "text"
Response.Write xmlhttp.responsexml.xml
Set xmlhttp = nothing
Anyone notice any obvious flaws in there? (Server is w2003, IIS6)
What type of object is xmlhttperoi??
What type of content are these 'services' expecting, XML or HTML Form posts?
If XML the you've set the Content-Type header incorrectly.
If HTML Form Post the xmlhttperoi needs to be a URL encoded string.
>
When I had "Response.ContentType = "text"" set to "text/xml" it would
return an xml syntax error on the "@" of an email address in the post
string. Could that be the culprit? I don't think EROI is receiving this
as XML, so I'd doubt it, but I'm sort of dumb most of the time.
Thanks.

Jan 13 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.