472,954 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,954 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 3731
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...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.