Link to home
Start Free TrialLog in
Avatar of rivkamak
rivkamakFlag for United States of America

asked on

jquery autocomplete

I am using jquery autocomplete.
How can I allow only a selection from the choices be allowed? you should not be able to type something in by yourself in that box?
ASKER CERTIFIED SOLUTION
Avatar of Pratima
Pratima
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
post us your html and jquery code to help out you better.
Avatar of rivkamak

ASKER

This is the autocomplete code. what do I have to add to make sure the only value in the box is one that comes from the autocomplete values?

    $("#GoingTo").autocomplete({
                source: "states.php",
                minLength: 1,
           select: function(event, ui) {
             $('#course_val').val(ui.item.id);
          }
            });