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

using xmlhttp in ASP

I have the code below and in a random fashion it is responding extremely
slowly. On in 3-4 times it takes ages to do the job... Any help will be much
appreciated...
It is the line: xml_http.Send("") that gets stuck. I am on IIS 6 on Windows
Server 2003 Web Edition.

<%
pcode = request.querystring("postcode")

source2 = "http://3rdparty.com/addresslist.pce?postcode=" & pcode

Dim xml_http
Set xml_http = Server.CreateObject("Microsoft.XMLHTTP")
xml_http.Open "GET", source2, false

set source = Server.CreateObject("Microsoft.XMLDOM")
set sourceSorted = Server.CreateObject("Microsoft.XMLDOM")
set styleDoc = Server.CreateObject("Microsoft.XMLDOM")

source.async = true
sourceSorted.async = true
styleDoc.async = true
xml_http.Send("")

source.loadxml(xml_http.ResponseText)

styleDoc.load(Server.MapPath("/postcode/ReDoXmlSorted.xsl"))
source.transformNodeToObject styleDoc, sourceSorted

for each obj in sourceSorted.getElementsByTagName("Address")
'for each obj2 in sourceSorted.getElementsByTagName("PostKey")
' postKey = obj2.text
'next
set pKEy = obj.nextSibling
response.write("<option value='" & pKEy.text & "'>" & replace(obj.text,
pcode, "") & "</option>")
next
xml_http.abort()


%>

May 29 '07 #1
1 3749
Zagor wrote:
I have the code below and in a random fashion it is responding
extremely slowly. On in 3-4 times it takes ages to do the job... Any
help will be much appreciated...
It is the line: xml_http.Send("") that gets stuck. I am on IIS 6 on
Windows Server 2003 Web Edition.

<%
pcode = request.querystring("postcode")

source2 = "http://3rdparty.com/addresslist.pce?postcode=" & pcode

Dim xml_http
Set xml_http = Server.CreateObject("Microsoft.XMLHTTP")
Don't use XMLHTTP in server-side code. Instead use

Set xml_http = Server.CreateObject("Microsoft.ServerXMLHTTP")

http://classicasp.aspfaq.com/general...-web-page.html
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
May 29 '07 #2

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

Similar topics

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,...
6
by: Wescotte | last post by:
I've wrote a little test app to use XMLHTTPRquest test app but I'm looking to add some functionality and I'm not quite so how to go about doing it. Below is the source What I'd really like is...
7
by: pbd22 | last post by:
Hi. I am somewhat new to this and would like some advice. I want to search my xml file using "keyword" search and return results based on "proximity matching" - in other words, since the search...
3
by: SM | last post by:
Hello, Im trying to access elements in my XML file using the JavaScript DOM but i'm not sure how. I use AJAX to access the XML and then use the responseXML property to access the XML file data. I...
10
by: neverquit | last post by:
hi , Iam Nagesh,Begineer in using Ajax,well i have been using ajax in application, i have faced a problem while placing the responseTEXT into the <div> tag positioned inside the <form> tag iam...
2
by: mukeshrasm | last post by:
hello i want to display the subjects on the same page based on class selected by user. i am using dropdown for classes. so when user will select a particular class then it will display subjects in...
20
by: vjayis | last post by:
hi when i m trying to fetch data from one page to another page using ajax, i get an error message in IE., but it runs well in firefox., could anyone help me., here is my javascript code., ...
5
by: perhapscwk | last post by:
I want to use ajax, by selected the option box, retrieve data from a .xml file and fill in to the textbox. below is the html page <script src="selectcd.js"></script> <form> Select a CD:...
6
by: tinman486 | last post by:
Im new to the whole javascript game, I know pretty much just enough to be dangerous with no real substance. Anyway Im trying to populate a DIV with a website using the URL as an inner html source ...
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: 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
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,...
0
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,...
0
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...
0
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
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
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,...
0
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...

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.