I'm new to flex. I have a dropdownlist that I a populating from an httpservice. I'm trying to get the value of the item selected by the user.
ddl.selecteditem.toString() does not seem to work as it returns an object. What is the correct syntax?
The code for my dropdown list is below
<!-- xml service for species list -->
labelField = "BINOMIAL"
So you are displaying speciesService.lastResult.madagascar_species.species.BINOMIAL in the list.
To get out the value you are interested in try ddl.selectedItem.BINOMIAL or something like that.
The same way you had to specify the property to display in the list, you have to specify which property you want to get out, unless you want the whole object.