Hi,
I’ve run into this edge case with the combo box where I need to get the text entered into the box that is not in the predefined list. Let’s say the list contains “lime green”, but I want to allow the user to input “lime”, which is not in the predefined list. When typing into the box, it will auto select the index for “lime green”. When I call $(‘#myComboBox’).val(), it will get the value of the selected index, grabbing whatever I have set as the value member for “lime green”, instead of it using the jQuery functionality and retrieving the text within the box. This issue does not arise if I enter in a value that cannot be auto-completed to an item within the list, because then the selected index will be -1 and calling .val() will utilize jQuery’s functionality, and retrieve the text entered.
How can I make sure that I am getting the text inside the box and not the value of the item in the combo box?
Thanks,