how to autocomplete

Discussion in 'MySQL' started by igorov, Aug 28, 2010.

  1. #1
    Hello;
    I've got a long list of words and their descriptions stored in a mysql table. The user interface is provided with a list that I made using html option. Now, what I want to do is to enable users to quickly reach the word they are looking up by typing the first few letters so that the options will appear as a list below the typing box; and I want only the words in the database to be seen, not irrelevant words. Is there a mysql / php command, script to achieve that? I tried LIKE but it didn't work at all. Can anybody help?
    Thanks in advance.
     
    igorov, Aug 28, 2010 IP
  2. rayqsl

    rayqsl Active Member

    Messages:
    91
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    53
    #2
    You need to read up on AJAX - javascript is needed.
     
    rayqsl, Aug 29, 2010 IP
  3. igorov

    igorov Guest

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you very much. I somehow managed to get what I wanted. The list appears just below the type box when letters are typed. However, I couldn't find an answer to how to autosubmit the form. There are answers but none meet my need. Some autosubmit at the end of a predefined period, which is either too quick or too slow. I tried onchange and the form was submitted but without the input.
     
    igorov, Aug 29, 2010 IP