# Help! function not getting called in onLoad

**URL:** <https://forum.kirupa.com/t/help-function-not-getting-called-in-onload/283640>\
**Category:** flash\
**Created:** [March 9, 2009, 2:56pm UTC](https://forum.kirupa.com/t/help-function-not-getting-called-in-onload/283640 "2009-03-09T14:56:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trupti](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trupti/32/3418_2.png) [@Trupti](https://forum.kirupa.com/u/Trupti)\
**Post date:** [March 9, 2009, 2:56pm UTC](https://forum.kirupa.com/t/help-function-not-getting-called-in-onload/283640/1 "2009-03-09T14:56:19Z")

</div>

Hello there,

Here is my problem,  
I am loading one xml file and onload (or onData) of this file I am calling another function but, this function is not getting called.  
What can be the issue? Can delegates be used here and how?

Here is the code for reference

```auto

//path for _global.bookXML is defined already.
_global.book_xml = new XML();
_global.book_xml.ignoreWhite = true;

// load content xml
_global.book_xml.load(_global.bookXML);
//after content xml is loaded
_global.book_xml.onLoad = function(success)
{
    if (success)
   {
       fnCallOtherFunction();   
   }
} 

public function fnCallOtherFunction()
{
//code for this function
}

```

Can any one help with this issue?

Thanks in advance  
Trupti
