• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 22. XML and XSLT > Handling XML Document Events

Handling XML Document Events

As with HTML documents, it can be important to know when an XML document loads and its data is available. The Internet Explorer actually enables you to track the progress of an XML document as it’s being loaded. In this case, you can use the onreadystatechange and ondataavailable events. The ondataavailable event occurs when the data from the XML document is available for use, and you can connect an event handler to this event like this:

document1.ondataavailable = dataAvailable 
        . 
        . 
        . 
function dataAvailable() 
{ 
    div1.innerHTML = "The data is now available!" 
} 


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint