# addEventListener / comboBox - not working programmatically!

**URL:** <https://forum.kirupa.com/t/addeventlistener-combobox-not-working-programmatically/202968>\
**Category:** flash\
**Created:** [October 6, 2006, 5:39am UTC](https://forum.kirupa.com/t/addeventlistener-combobox-not-working-programmatically/202968 "2006-10-06T05:39:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![waffe](https://avatars.discourse-cdn.com/v4/letter/w/c37758/32.png) [@waffe](https://forum.kirupa.com/u/waffe)\
**Post date:** [October 6, 2006, 5:39am UTC](https://forum.kirupa.com/t/addeventlistener-combobox-not-working-programmatically/202968/1 "2006-10-06T05:39:09Z")

</div>

Hi,

I have a comboBox with an EventListener:

```auto

rhythmTypeListener = new Object();
rhythmTypeListener.change = function(evt) {
	trace(&#8220;run code&#8221;);
}
rhythmType_Combo.addEventListener("change", rhythmTypeListener);

```

All of this works until I select the comboBox’s index programmatically;

```auto

rhythmType_Combo.selectedIndex = 6;

```

The comboBox changes to the approrite text but the EventListener is never called.

Why is this, and is there a way?
