Z
Zagor
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()
%>
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()
%>