You are here: Reference > JavaScript > client-side > event handling > events > ondatasetcomplete

ondatasetcomplete event | datasetcomplete event

Browser support:
Occurs on a data source object when all its data becomes available.

How to register:

<ELEMENT ondatasetcomplete="handler">

In JavaScript:
object.ondatasetcomplete = handler;
object.attachEvent ("ondatasetcomplete", handler);
You can find the related objects in the Supported by objects section below.
The event object is accessible to all event handlers in all browsers. The properties of the event object contain additional information about the current event. To get further details about these properties and the possible event handler registration methods, please see the page for the event object.
For a complete list of events, see the page for Events in JavaScript.

Basic information:

Bubbles Yes
Cancelable No
Event object -

Actions that invoke the ondatasetcomplete event:

  • When all data of the data source object becomes available.

The order of events related to the ondatasetcomplete event:

The ondatasetchanged event always occurs before the ondatasetcomplete event.

Example HTML code 1:

This example illustrates the use of the ondatasetcomplete event:
    <script type="text/javascript">
        function OnDatasetChanged () {
            alert ("Data set changed!");
        function OnDatasetComplete () {
            alert ("All data is available!");
    <xml id="movies" ondatasetchanged="OnDatasetChanged ();" ondatasetcomplete="OnDatasetComplete ();">
    <?xml version="1.0"?>
                <name>Clark Kent</name>
                <name>Lois Lane</name>

    <table id="myTable" width="100%" cellpadding="0px" cellspacing="2px" border="1px" datasrc="#movies" datapagesize="2">
                <td><span datafld="name"></span></td>
                <td><span datafld="jobtitle"></span></td>
                <td><span datafld="born"></span></td>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content