Please help!!
I have a server side vbscript doing the asynchronous xml load. The following is the code. But when I run it, i keep getting the following error in the line calling the getRef function (xmlDoc.onreadystatechange = GetRef("foo_onreadystatechange")):
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[undefined]'
Can someone help me? I can't find out why there is a mismatch.
=====the following is the code===
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <TITLE></TITLE> </HEAD> <BODY>
<P>this is the test</P>
<SCRIPT LANGUAGE="VBScript" RUNAT=SERVER>
Dim ready_flag
ready_flag = 0
set xmlDoc = Server.CreateObject("Msxml2.DOMDocument.4.0")
xmlDoc.async = true
xmlDoc.onreadystatechange = GetRef("foo_onreadystatechange")
xmlDoc.Load "book.xml"
sub foo_onreadystatechange
if xmlDoc.readyState = 4 then
ready_flag = ready_flag or 1
response.write "xmlDoc finished<br>"
end if
end sub
</SCRIPT>
I have a server side vbscript doing the asynchronous xml load. The following is the code. But when I run it, i keep getting the following error in the line calling the getRef function (xmlDoc.onreadystatechange = GetRef("foo_onreadystatechange")):
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[undefined]'
Can someone help me? I can't find out why there is a mismatch.
=====the following is the code===
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <TITLE></TITLE> </HEAD> <BODY>
<P>this is the test</P>
<SCRIPT LANGUAGE="VBScript" RUNAT=SERVER>
Dim ready_flag
ready_flag = 0
set xmlDoc = Server.CreateObject("Msxml2.DOMDocument.4.0")
xmlDoc.async = true
xmlDoc.onreadystatechange = GetRef("foo_onreadystatechange")
xmlDoc.Load "book.xml"
sub foo_onreadystatechange
if xmlDoc.readyState = 4 then
ready_flag = ready_flag or 1
response.write "xmlDoc finished<br>"
end if
end sub
</SCRIPT>