# Problem with a list component

**URL:** <https://forum.kirupa.com/t/problem-with-a-list-component/179050>\
**Category:** Uncategorized\
**Created:** [February 16, 2006, 8:51am UTC](https://forum.kirupa.com/t/problem-with-a-list-component/179050 "2006-02-16T08:51:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shiver](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@shiver](https://forum.kirupa.com/u/shiver)\
**Post date:** [February 16, 2006, 8:51am UTC](https://forum.kirupa.com/t/problem-with-a-list-component/179050/1 "2006-02-16T08:51:09Z")

</div>

Does anyone knnows how can i change the contents on a list comonent when i press a buton… a have a list component that is populated from 2 array… and these array are populatet from an xml file… and i want… when i click on a buton to change the contents of the list in fucntion of a type that i chose… ex:  
// the arrays  
\_global.idu = currentLocation.attributes.id;  
\_global.titles = currentLocation.attributes.title;  
\_global.tipul = currentLocation.attributes.tip;

//the iff… this i think it needs changes…🙂  
if (tipul == “city”) {  
\_root.container.menuList.orList.addItem(titles, idu);  
}

orList - is the list compoent… and container and menuList are mc…  
a need to change the content if the type is the one i want…

hope someone understands me… please HELP…
