PDA

View Full Version : Undefined in Combobox, absolutely stumped!!


gazzer82
03-06-2006, 12:25 PM
Hi All

This is really doing my head in!!

Ok so what am i trying to do?

I am pulling in some data from a mysql databse using a php script to generate an xml file that is then pulled into flash using an xml connector.

The data is then passed into a dataholder, and then a combobox, this box is then used to sort another dataset by whats selected.

My Problem?

The combobox keeps reporting undefined when i try to get the selected option out of it.

The Script

_root.work_mc.type_txt.text = _root.work_mc.type_cb.getSelectedItem().label;

I have also tried pretty much every other option in the combobox and they all seem to report undefined.

Help Please!!

Cheers

Gareth

mayur_vnit
03-06-2006, 12:55 PM
if your combobox..is showing value then it should work for you

gazzer82
03-06-2006, 01:23 PM
Hi

Thanks for your response.

Thats the infuriating thing, the combobx fills correctly and displays all the correct data. I just can't manage to transfer the data to anywhere else.

As i said it has me stumped.

Cheers

Gareth

gazzer82
03-06-2006, 03:35 PM
Anyone?

Please this is really bugging me!!

Cheers

Gareth

feanish
03-07-2006, 02:36 AM
_root.work_mc.type_txt.text = _root.work_mc.type_cb.getSelectedItem().label;

should be:

_root.work_mc.type_txt.text = _root.work_mc.type_cb.selectedItem.data