473,385 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 4514

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Shannon | last post by:
Hi everyone, I am trying to post some data to a form using the XMLHTTP object, and have run into a problem trying to find the proper location of the receiving page. The form points to a...
9
by: fochie | last post by:
Greetings, I'm having a problem when I try to GET a file from my server via xmlhttp when using Mozilla. With IE I can get any type of file fine, get/display headers fine, etc. With Mozilla,...
10
by: Aj Blosser | last post by:
Hey guys, I have a question for you, I have a setup where I'm sending files through the POST to a php web page, I read the file contents, put that file contents as text into the POST string, and...
8
by: rithish | last post by:
I am on IE 6. I was trying out a simple xmlhttp function that send GET/POST requests. However, IE throws an 'unspecified error' when I call the 'setRequestHeader' method. The function that I am...
14
by: FMDeveloper | last post by:
Currently transitioning from a shared host to a dedicated server. The same code that works on the old server is not working on the dedicated server. It is a simple AJAX request like: <code>...
8
by: Mo | last post by:
Hi, I can not find a decent example showing how to consume a asp.net 2.0 web service using classic ASP. Does any body have an example I could use? Thanks
2
by: shivendravikramsingh | last post by:
hi friends, i m using a ajax function for retrieving some values from a database table,and display the values in required field,my prob is that the ajax function i m using is working f9 once,but if...
1
by: javediq143 | last post by:
Hi All, This is my first post in this forum. I'm developing a CMS for my latest website. This CMS is also in PhP & MySQL. I'm done with the ADD section where the Admin can INSERT new records in...
5
by: thatcollegeguy | last post by:
Below are my 3php and 2js files. I create a table using ajax/php and then want to change the values in the tables add(+ number for teamid) id's for each specific td in the table. I don't know...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.