Hi Experts,
I have an autocomplete function which brings back an array of iID and values.
The values are displayed to the user.
When selected the corresponding ID is stored in a hidden field.
I need to enforce the rule that if the user doesn't choose from the list (ie ID hasn't been set) then
they cannot carry on. However, as the ID field is hidden, I am having trouble trying to come up with an elegant way of displaying this to the user.
Just after some advice on how you would tackle this problem!
Thanks
if( $("#listID").attr("selectedIndex") == 0 ) {
e.preventDefault();
alert("select something in the list!");
}
});