473,554 Members | 3,230 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Createob ject("MSXML2.Se rverXMLHTTP")
xmlhttp.Open
"POST","htt p://emailer.emailro i.com/multisubscribe. ice",false
xmlhttp.setRequ estHeader "Content-Type", "applicatio n/x-www-form-
urlencoded"
xmlhttp.send xmlhttperoi
Response.Conten tType = "text"
Response.Write xmlhttp.respons exml.xml
Set xmlhttp = nothing
Anyone notice any obvious flaws in there? (Server is w2003, IIS6)

When I had "Response.Conte ntType = "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 4536

"Pupkin" <sp*******@dorr k.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.Createob ject("MSXML2.Se rverXMLHTTP")
xmlhttp.Open
"POST","htt p://emailer.emailro i.com/multisubscribe. ice",false
xmlhttp.setRequ estHeader "Content-Type", "applicatio n/x-www-form-
urlencoded"
xmlhttp.send xmlhttperoi
Response.Conten tType = "text"
Response.Write xmlhttp.respons exml.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.Conte ntType = "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
6206
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 directory, like so: <form action="/servlet/Login" target="_top" method="POST" enctype="x-www-form-encoded" onSubmit='return goodform()'> but the...
9
5554
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, using the same HTML/JS it always returns no data (xmlhttp.responseText is null). When I try to get headers using Mozilla or display the http status...
10
8930
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 send it on it's way. it works perfectly for text files. However, I can't open a word document like a text file and have it give me the result I...
8
14281
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 trying out is give below. Am I doing something wrong? Any help is greatly appreciated. /*
14
9987
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> function createXMLHttpRequest() { if (window.ActiveXObject) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } else if (window.XMLHttpRequest) {
8
9815
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
3139
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 i change something in php file using in ajax function.it not refreshed,means its shows the previous result it not get updated.i can't understand...
1
4587
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 Database but I'm stuck in the EDIT. I'm getting 2 problems over here. Below is the description: 1)The FIRST page will list all the records from the...
5
4442
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 if I have the entirely wrong approach, but my code is below. Any or all help is appreciated! What currently happens is that the getdivision.php...
0
7583
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7507
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7783
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8019
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6127
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5424
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.