V
vunet.us
Hello,
I use XMLHTTP to get an HTML of another page. Then, I need to cut some
middle part of that HTML string but I have problems doing it (see note
in caps below). The error I have generated at response.write (because
it does not split) is:
Microsoft VBScript runtime error '800a0009'
Subscript out of range: '[number: 1]'
/get_item.asp, line 55
Dim objXmlHttp
Dim strHTML
Set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objXmlHttp.open "GET", "http://www.site.com/item.asp?id=10, False
objXmlHttp.send
strHTML = objXmlHttp.responseText
Dim FullHTML : FullHTML = Server.HTMLEncode(strHTML)
HTMLArr = split(FullHTML,"<!--item code separator-->") 'THIS DOES NOT
SPLIT
response.write HTMLArr(1)
dim PureHTML : PureHTML = FullHTML 'HTMLArr(1)
Please, suggest.
I use XMLHTTP to get an HTML of another page. Then, I need to cut some
middle part of that HTML string but I have problems doing it (see note
in caps below). The error I have generated at response.write (because
it does not split) is:
Microsoft VBScript runtime error '800a0009'
Subscript out of range: '[number: 1]'
/get_item.asp, line 55
Dim objXmlHttp
Dim strHTML
Set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objXmlHttp.open "GET", "http://www.site.com/item.asp?id=10, False
objXmlHttp.send
strHTML = objXmlHttp.responseText
Dim FullHTML : FullHTML = Server.HTMLEncode(strHTML)
HTMLArr = split(FullHTML,"<!--item code separator-->") 'THIS DOES NOT
SPLIT
response.write HTMLArr(1)
dim PureHTML : PureHTML = FullHTML 'HTMLArr(1)
Please, suggest.