# XML onload parameters

**URL:** <https://forum.kirupa.com/t/xml-onload-parameters/160837>\
**Category:** flash\
**Created:** [August 29, 2005, 10:42pm UTC](https://forum.kirupa.com/t/xml-onload-parameters/160837 "2005-08-29T22:42:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![borispc](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@borispc](https://forum.kirupa.com/u/borispc)\
**Post date:** [August 29, 2005, 10:42pm UTC](https://forum.kirupa.com/t/xml-onload-parameters/160837/1 "2005-08-29T22:42:31Z")

</div>

Hello,

I’d like to pass a parameter into the xml.onload function.

Usually we have:  
myXML = new XML();  
myXML.onLoad = handleLoad;  
myXML.load(“whatever.xml”);

function handleLoad(success){  
if(success){  
//do something  
}else{  
//do something else  
}  
}

MY GOAL:  
something like:  
p=this;  
myXML.onLoad = handleLoad(success,p)  
…

function handleLoad(success,p){  
…  
}

I want to be able to pass a parameter § into the handleLoad function as well as track the onload success…

How do you do this?

thanks in advance…
