# onLoad

**URL:** <https://forum.kirupa.com/t/onload/293915>\
**Category:** flash\
**Created:** [August 5, 2009, 7:23pm UTC](https://forum.kirupa.com/t/onload/293915 "2009-08-05T19:23:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Offrenbaruna](https://avatars.discourse-cdn.com/v4/letter/o/7cd45c/32.png) [@Offrenbaruna](https://forum.kirupa.com/u/Offrenbaruna)\
**Post date:** [August 5, 2009, 7:23pm UTC](https://forum.kirupa.com/t/onload/293915/1 "2009-08-05T19:23:36Z")

</div>

Hello again, this is more a question than a solution request, here we go…

I have this code

```php

myXML.onLoad = function(success){
    code
    more code 
    and code ++
}
myXML.load("gallery.xml");

```

so, where is my code inside the function I have some variables which are global variables that I declared and I attempt to use outside of the function.

Is this possible ? I ask the question cause I don’t see that they work :cantlook:
