473,480 Members | 2,592 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Using MSXML2.ServerXMLHTTP.4.0 to get a form value

2 New Member
I am calling a remote web server and awaiting data that is being passed back to my process in a form variable.

postData = "fname=John"
Set xmlHttp = Server.Createobject("MSXML2.ServerXMLHTTP.4.0")
Call xmlHttp.Open("POST", "http://www.webSite.com", false)
Call xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
Call xmlHttp.send(postData)
Response.ContentType = "text/html"

'Need to get two values from a form.

I am familiar with getting back the xmlHttp.responsetext to get back all of a webpage that is passed back but not how to get individual values from the form.
Nov 3 '08 #1
3 6245
jhardman
3,406 Recognized Expert Specialist
If you know the names of the form inputs, you just call them as request("inputName") or request.form("inputName"). If you don't know the names, you can loop through them like this:
Expand|Select|Wrap|Line Numbers
  1. for each x in request.form
  2.    'perform action on request(x)
  3. next
Let me know if this helps.

Jared
Nov 4 '08 #2
dfordinal
2 New Member
I thought I would have to get the form data from the responsetext of the object.
Nov 10 '08 #3
jhardman
3,406 Recognized Expert Specialist
I thought I would have to get the form data from the responsetext of the object.
I guess that depends on whether you are using "classic" ASP or ASP.NET. In "classic" ASP all requests are in THE request object. If you are using ASP.NET, then you posted in the wrong forum - this forum is for classic ASP only - as the sticky at the top of this forum says.

Jared
Nov 11 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
14581
by: ehilario | last post by:
Hello everyone, I am trying to access a webservice to post some values via MSXML2.ServerXMLHttp The OS used is win2003 on both machines. When I access the local machine (A) which has the same...
1
6551
by: Raúl Martín | last post by:
I´ve a function in asp that run correctly but If I tried to change it forasp.net in asp: xmlHTTP = CreateObject("Microsoft.XMLHTTP") And I thought to use this sentence for asp.net but the...
2
8713
by: Maris Janis Vasilevskis | last post by:
Hi, Is it possible to force HttpWebRequest to do exactly (not approximately) the same as MSXML2.ServerXMLHTTP does? More details. I port JScript to JScript.NET I have a server (ASP invoking...
10
8917
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...
5
10374
by: David Lozzi | last post by:
Howdy, I wrote a web service in .Net for my customer. My customer has another vendor who now has to consume it but they are not using Visual Studio. Most of their pages are jsp, and they said...
2
10676
by: Ramya A | last post by:
Hi All: I have a .NET webservice accepting an XML request document as a parameter How do I call this webservice with ServerXMLHTTP object from my VB6.0 client? I have enabled the HttpPost...
8
21725
by: lopi | last post by:
Hello. I'm trying to remotely get a pdf file - http://remoteServer/file.pdf - in order to store it into another server, maybe with Scripting.FileSystemObject However the following code doesn't...
3
5158
by: charliefryer | last post by:
Hi all, I have an application that submits multiple xml queries to a different application, processes the xml it recieves back and displays relevant information to the user. However sending the xml...
3
2368
by: yuvalbra | last post by:
Does anyone know how to implement a stock quote using ASP on a website? Any sample code or components, etc., would be appreciated. I try this but got error 500 on page strURL =...
0
6920
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...
1
6760
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7022
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...
0
5365
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,...
1
4799
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...
0
4501
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3004
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.