Specifies whether asynchronous download is permitted.
boolValue = oXMLDOMDocument.async; objXMLDOMDocument.async = boolValue;
The following example sets the async
property of a DOMDocument
object to false
before loading books.xml.
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.5.0"); xmlDoc.async = false; xmlDoc.load("books.xml"); if (xmlDoc.parseError.errorCode <> 0) { var myErr = xmlDoc.parseError; alert("You have error " + myErr.reason); } else { alert(xmlDoc.xml); }
boolValue = oXMLDOMDocument.async objXMLDOMDocument.async = boolValue
The following example sets the async
property of a DOMDocument
object to false
before loading books.xml.
Dim xmlDoc As New Msxml2.DOMDocument50 xmlDoc.async = False xmlDoc.Load ("books.xml") If (xmlDoc.parseError.errorCode <> 0) Then Dim myErr Set myErr = xmlDoc.parseError MsgBox("You have error " & myErr.reason) Else MsgBox xmlDoc.xml End If
HRESULT get_async( VARIANT_BOOL *isAsync); HRESULT put_async( VARIANT_BOOL isAsync);
isAsync
is Null.Boolean. The property is read/write. Returns True if asynchronous download is permitted; False if not. Default is True.
When set to True, the load
method returns control to the caller before the download is finished. You can then use the readyState
property to check the status of the download. You can also attach an onreadystatechange
handler or connect to the onreadystatechange
event to be notified when the ready state changes so that you know when the download is complete.
This member is an extension of the World Wide Web Consortium (W3C) Document Object Model (DOM).
To view reference information for Visual Basic, C/C++, or Script only, click the Language Filter button in the upper-left corner of the page.
onreadystatechange Property | onreadystatechange Event | readyState Property
Applies to: DOMDocument