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?