A certain application I am wanting to write has a client requirement to not pass strings with periods in them back to the database from a CascadingDropDown, but do show the period in the box on the screen.
So easy enough, in my web service I have it return a CascadingDropDownNameValue object with the name with periods and the values without.
Now, say I want to access the "names" i.e., the text showing in the dropdown box on screen, from JavaScript, i.e.
ddlModel.options[ddlModel.selectedIndex].text;
I know I can get the "value" i.e., the text "behind" the dropdown by using
ddlModel.options[ddlModel.selectedIndex].value;
but I don't want the "value" I want the displayed "text." However the line
ddlModel.options[ddlModel.selectedIndex].text;
isn't giving me the text that has the period in it, like I want. Any hints?
Brian