# List, component, done, almost. help

**URL:** <https://forum.kirupa.com/t/list-component-done-almost-help/232790>\
**Category:** Uncategorized\
**Created:** [July 17, 2007, 8:50pm UTC](https://forum.kirupa.com/t/list-component-done-almost-help/232790 "2007-07-17T20:50:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Multi\_Task](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Multi\_Task](https://forum.kirupa.com/u/Multi_Task)\
**Post date:** [July 17, 2007, 8:50pm UTC](https://forum.kirupa.com/t/list-component-done-almost-help/232790/1 "2007-07-17T20:50:47Z")

</div>

Hey yall I have posted on this before but still having no luck figuring out how to check if (component) list has been selected then proceed to next page, otherwise setFocus.

Right now everything populates and functions perfect, however if the user doesnt select something from list and hits button the page transfers to [www.mydomain.com/undefined](http://www.mydomain.com/undefined).

I am trying to run a check on it if they havent then dont do anything but having trouble. Can anyone throw me a bone here?

```auto

var arUrl:Array=["/browsecategory.aspx?cat=1","/browsecategory.aspx?cat=2","/browsecategory.aspx?cat=3"];
var provider:Array=[{label:"Option One",data:0},{label:"Option Two",data:1},{label:"Option Three",data:2}];
choice.mcList.dataProvider=provider;
var obj:Object={};
obj.click=function(eo:Object)
{
var count:Number=choice.mcList.selectedItem.data;
getURL(arUrl[count],"_self");
trace("count="+arUrl[count]);
}
but.mcSubmit.addEventListener("click",obj);/////here is where I am sending off
if (provider == undefined) {
setFocus.mcList;
}

```

Thanks in advance  
MT
