|
rage2001 -> RE: Complicated ASP Call (8/15/2006 19:01:57)
|
like this is what I really don';t understand... as a test, I tested my parsing of the Msxml2.ServerXMLHTTP in a small script. So i took in what I got, which I showed you above, and then I parsed it. Then I realized about the - and ' in their names... so i wrote the replace function.. just like this in my "TEST" script: stuCombo = "p_input=test"
url = "https://www.test.ca"
set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objHttp.open "POST", url, false
objHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objHttp.Send stuCombo
RecordID = objHttp.responseText
if objHttp.status = 200 Then
if Instr(RecordID, "Invalid ID") then
response.write "Sorry, invalid info!"
else
findBreak=instr(RecordID,"Last Term:")
name=Trim(mid(RecordID,1,findBreak-1))
leftover=trim(mid(RecordID,findBreak))
name = replace(name,"-","")
name = replace(name,"'","")
strAryWords = Split(name, " ")
upperBound = Ubound(strAryWords)
firstName = strAryWords(0)
middleName = strAryWords(upperBound)
lastName = strAryWords(1)
strInitial = mid(middleName,1,1)
response.write name & "<br>"
response.write firstName & "<br>"
response.write lastName & "<br>"
response.write middleName & "<br>"
response.write strInitial & "<br>"
end if
else
response.write "Sorry, website down."
end if
set objHttp = nothing This worked fine!!!! then I placed it in my "actual" project, and that error comes up...
|
|
|
|