# Loading an external variable into a ListBox

**URL:** <https://forum.kirupa.com/t/loading-an-external-variable-into-a-listbox/55582>\
**Category:** flash\
**Created:** [June 25, 2004, 9:06am UTC](https://forum.kirupa.com/t/loading-an-external-variable-into-a-listbox/55582 "2004-06-25T09:06:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![steveb1164](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@steveb1164](https://forum.kirupa.com/u/steveb1164)\
**Post date:** [June 25, 2004, 9:06am UTC](https://forum.kirupa.com/t/loading-an-external-variable-into-a-listbox/55582/1 "2004-06-25T09:06:04Z")

</div>

When I use the following Action Script to pull the variable ‘leaguename’, which has the value “flashtest”, from my ASP page and insert the value into my ListBox called ‘playerlist’, the text ‘\_level0.leaguename’ is written in the ListBox instead of ‘flashtest’.

myData = new LoadVars();  
myData.onLoad = function() {  
leaguename.text = this.leaguename;  
};  
myData.load(“livedraftvar.asp”);

playerlist.addItem(leaguename);

The output from my ASP page is: &leaguename=flashtest&

What am I doing wrong? Everything looks right to me.
