# \[F8\] Sending labels from a combo box to a text field

**URL:** https://forum.kirupa.com/t/f8-sending-labels-from-a-combo-box-to-a-text-field/231700
**Category:** flash
**Created:** [July 6, 2007, 9:27pm UTC](https://forum.kirupa.com/t/f8-sending-labels-from-a-combo-box-to-a-text-field/231700 "2007-07-06T21:27:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![steve77997](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@steve77997](https://forum.kirupa.com/u/steve77997)
#### Post date: [July 6, 2007, 9:27pm UTC](https://forum.kirupa.com/t/f8-sending-labels-from-a-combo-box-to-a-text-field/231700/1 "2007-07-06T21:27:18Z")

</div>

How can I send a combo box’es labels to a text box? I would just like it to display whatever the user picked in a text box. I tried using a listener:

objComboListener = [COLOR=#000000] **new** [/COLOR] [COLOR=#0066cc]Object[/COLOR]COLOR=#66cc66[/COLOR];  
objComboListener.[COLOR=#006600]change[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#66cc66[/COLOR][COLOR=#66cc66]{[/COLOR]  
[COLOR=#66cc66][/COLOR]mon.[COLOR=#0066cc]text[/COLOR] = eventObj.[COLOR=#0066cc]target[/COLOR].[COLOR=#006600]value[/COLOR];  
[COLOR=#66cc66]}[/COLOR]  
[COLOR=#66cc66][/COLOR]mon\_cb.[COLOR=#006600]addEventListener[/COLOR][COLOR=#66cc66]([/COLOR][COLOR=#ff0000]“change”[/COLOR], objComboListener[COLOR=#66cc66])[/COLOR];

mon.text is the textbox, mon\_cb is the combo box.

There are two problems with the above code though:  
A. It displays my data, and not the labels. Should be an easy fix, but I’m no good with actionscript…  
B. It only displays the first selection. Eg; if I choose something, it will display that thing, but if I choose another choice, it continues to display the first selection.

Does anyone know what I messed up?
