PDA

Click to See Complete Forum and Search --> : .load method help


mustafi
Jun 25th, 2002, 12:13 AM
Hi - I am using the following piece of code:

<OBJECT width=0 height=0
classid="clsid:550dda30-0541-11d2-9ca9-0060b0ec3d39"
id="xmldso">
</OBJECT>

<SCRIPT for=window event=onload>
var doc = xmldso.XMLDocument;
doc.async=true
doc.load("TestBindData.asp");
if (doc.documentNode == null)
{
alert('error');
}
</SCRIPT>

in my page, however ever time doc.documentNode is null but
the data binds with the html element just fine. why is
the documentNode null if it works allright?

thanks

WALDO
Jun 27th, 2002, 11:00 AM
Perhaps because you want documentElement, not documentNode?

Maybe it's because you have the async property set to true, therefore you're trying to query a property before it's done loading (asynchronously)