473,378 Members | 1,037 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,378 software developers and data experts.

Help, I can figure this out at all..

Hi am trying to send POST varables using XMLHTTP and for me it just dont work... this is the code below, can anybody see anything wrong. My page that I have called quote123.asp will display posted varables as I have tested it with another form ???

The weird thing is I got this code for 4guys and it works on on their example, but not locally on my server .... any ideas

<%

Response.Buffer = True
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Microsoft.XMLHTTP")

xml.Open "POST", "http://www.test.co.uk/insurance/quote123.asp", False
xml.setRequestHeader "Content-Type", "content=text/html; charset=iso-8859-1"
xml.Send ("affiliate=100307")

Response.Write xml.responseText

Set xml = Nothing
%>

Regards

Graham Mattingley
Jul 19 '05 #1
3 2293
Works fine.

Remove the Server. From the Server.CreateObject("Microsoft.XMLHTTP")
This will load quicker.

I removed the affiliate number.
To keep from sending a hit as if referred from someone.
-dlbjr

Discerning resolutions for the alms
Jul 19 '05 #2
Hi Dlbjr / Group...

maybe I didnt write it very well, I can get it to work doing what you say below, but it is the posting of 'affiliate=100307 to quote123.asp that I am have trouble with.

If I have a form an I have fields in it, and I use the POST form method then using 'request.form' I can see the form field names and values in the form.

I am trying to simulate the form by being able to post the data 'affiliate=100307' to the form quote123.asp using the code below

Cheers
Graham

<%

Response.Buffer = True
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Microsoft.XMLHTTP")

xml.Open "POST", "http://www.test.co.uk/insurance/quote123.asp", False
xml.setRequestHeader "Content-Type", "content=text/html; charset=iso-8859-1"
xml.Send ("affiliate=100307")

Response.Write xml.responseText

Set xml = Nothing
%>
"dlbjr" <do******@do.u> wrote in message news:boexb.215$Qy4.15617@typhoon01...
Works fine.

Remove the Server. From the Server.CreateObject("Microsoft.XMLHTTP")
This will load quicker.

I removed the affiliate number.
To keep from sending a hit as if referred from someone.
-dlbjr

Discerning resolutions for the alms
Jul 19 '05 #3
Graham Mattingley wrote:
Hi am trying to send POST varables using XMLHTTP and for me it just
dont work... this is the code below, can anybody see anything wrong.
My page that I have called quote123.asp will display posted varables
as I have tested it with another form ???

The weird thing is I got this code for 4guys and it works on on their
example, but not locally on my server .... any ideas

<%

Response.Buffer = True
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Microsoft.XMLHTTP")

xml.Open "POST", "http://www.test.co.uk/insurance/quote123.asp",
False
xml.setRequestHeader "Content-Type", "content=text/html;
charset=iso-8859-1"
xml.Send ("affiliate=100307")

Response.Write xml.responseText

Set xml = Nothing
%>

Regards

Graham Mattingley


Since this is server-side code, you should be using the ServerXMLHTTP
object.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tank | last post by:
I have had this post up here when i was trying to figure out how to make leading zeros and have been able to fudge that to work. I am now have trouble getting the loop that makes the folders to...
5
by: TrvlOrm | last post by:
HI There, I have been struggling with JavaScript code for days now, and this is my last resort! Please help... I am trying to create a JavaScript slide show with links for Next Slide,...
6
by: Dave | last post by:
I'm struggling with something that should be fairly simple. I just don't know the regext syntax very well, unfortunately. I'd like to parse words out of what is basically a boolean search...
2
by: DJG | last post by:
I need some help with a TreeView control in VB.Net I've got a datatable with about 8000 rows. 500 are 'folders', and the other 7500 rows are 'jobs'. It's a logical representation of some data,...
4
by: Jeff User | last post by:
Hi I tryed to solve this problem over in the framework.asp group, but still am having trouble. Hope someone here can help. using .net 1.1, VS 2003 and C# I have an asp.DataGrid control with a...
10
by: David Thielen | last post by:
Hi; I have help html pages for each page of my ASP.NET webapp. So for the page datasource.aspx, I have help\datasource.htm. Bu what I want when the hyperlink is clicked, for it to look for the...
2
by: JRamirez | last post by:
Need help cannot figure out where I made the error. -------------------------------------------------------------------------------- Can someone view what I have, I need help I cannot figure out...
15
by: Jay | last post by:
I have a multi threaded VB.NET application (4 threads) that I use to send text messages to many, many employees via system.timer at a 5 second interval. Basically, I look in a SQL table (queue) to...
1
by: kvazar | last post by:
What I am trying to create is basically a page with a bunch of multiple choice questions. Basically just like a test page. I am providing the code lower. All the questions that need to show as a part...
12
by: =?Utf-8?B?ZGdvdw==?= | last post by:
I designed a "contact_us" page in visual web developer 2005 express along with EW2 after viewing tutorials on asp.net's help page. Features work like they should, but I cannot figure out how to...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.