# Load listbox by xml?

**URL:** <https://forum.kirupa.com/t/load-listbox-by-xml/104910>\
**Category:** Uncategorized\
**Created:** [March 20, 2004, 10:46pm UTC](https://forum.kirupa.com/t/load-listbox-by-xml/104910 "2004-03-20T22:46:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gen329](https://avatars.discourse-cdn.com/v4/letter/g/e9bcb4/32.png) [@gen329](https://forum.kirupa.com/u/gen329)\
**Post date:** [March 20, 2004, 10:46pm UTC](https://forum.kirupa.com/t/load-listbox-by-xml/104910/1 "2004-03-20T22:46:43Z")

</div>

hello there, I know how rude it is to post a question being a new person to the forum and such, but I was wondering, I am trying to load a listbox through xml and my script does not seem to work at adding the items. Could someone please look over the script and tell me what is wrong? Here it is…

```auto

Prog_xml.load(Programs.xml)

xml.onLoad = function (success){
for (i=0; i<Prog_xml.childNodes.length; i++){
	list.addItem (Prog_xml.childNodes*.attributes.nodeName , Prog_xml.childNodes*.attributes.value)
	}
}

function Change (c){
	textbox.text = c.getSelectedItem().label;
	text2.text = c.getselectedItem().data;
	}
	
	list.setChangeHandler("Change");

```

once again I am very sorry to post this as I am so new to the forum.
