Need Help Modifying Autocomplete UI

Discussion in 'JavaScript' started by scottlpool2003, Apr 30, 2013.

  1. #1
    Never mind, decided to do it a more efficient way instead.
     
    Last edited: Apr 30, 2013
    scottlpool2003, Apr 30, 2013 IP
  2. HuggyStudios

    HuggyStudios Well-Known Member

    Messages:
    724
    Likes Received:
    20
    Best Answers:
    26
    Trophy Points:
    165
    #2
    If I was making this I would use jQuery on change function and then do what you need to do with that value. This should get you started:

    
    $(document).on('change', '#counties', function() {
    var counties = $('#counties').val();
    // do something with it here...
    }); 
    
    Code (markup):
     
    HuggyStudios, Apr 30, 2013 IP
  3. scottlpool2003

    scottlpool2003 Well-Known Member

    Messages:
    1,708
    Likes Received:
    49
    Best Answers:
    9
    Trophy Points:
    150
    #3
    Thanks for your reply. I decided to just have 1 list of UK towns instead of having multiple options.

    One of the problems I had was getting a valid list, they pretty much all have towns missing or in wrong counties so I'm advising the users to keep typing and entering the invalid result to the database so I can add it accordingly.

    Thanks again.
     
    scottlpool2003, Apr 30, 2013 IP