Hi I am using the combobox widget and was wondering if there is a way to test if “$(‘#cmbVehicleNbr’).jqxComboBox(‘getSelectedItem’)” is null or undefined? To get the value of the combobox I was using $(‘#cmbVehicleNbr’).val() however if the user types or deletes characters in the combobox that value will used instead of the selected item. To remedy this I tried using getselecteditem however if I type or delete charachters I get this error “Error: Unable to get value of the property ‘value’: object is null or undefined” with this code:
var item = $(‘#cmbVehicleNbr’).jqxComboBox(‘getSelectedItem’);
alert(item.value);
Is there a way to test if selected item is null or undefined? Or a better way to ensure something has been selected?
Thanks
John