Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Mar 2009
    Posts
    32
    Thanks
    5
    Thanked 0 Times in 0 Posts

    How do you code something similiar to how google guesses your input on the search box

    I'm developing a site where suppliers can sell their products. I have a mySQL database of possible items they can sell. So when you click sell it takes you to a new page with an input box of what you are selling. I would like to create something where lets say you input an 'a' into the box then a clickable list below has values like 'apple', 'antenna', 'ariel', etc. Everything beginning with 'a' is displayed.

    Google does this with there search box, you start writing something and it comes up with some possible suggestions of what you are going to type. I just can't think how to write this code, can anyone point me in the right direction? I'm fairly comfortable with JavaScript, PHP, mySQL and CSS.

    The reason for posting it here is I would like it still to be possible with JavaScript disabled, however I am doubtful this is possible.

    Cheers.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    They are using Ajax powered search, take a look at http://www.w3schools.com/php/php_ajax_livesearch.asp
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Mar 2009
    Posts
    32
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Thanks for the quick reply, I'll read up on that cheers.

  • #4
    Regular Coder sea4me's Avatar
    Join Date
    Jan 2009
    Location
    Damn, I don't know...
    Posts
    390
    Thanks
    11
    Thanked 28 Times in 27 Posts
    here is a better one:

    Auto Complete


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •