AutoComplete using values from Database Table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gyanendar
    New Member
    • Jun 2007
    • 90

    AutoComplete using values from Database Table

    hi,

    I am trying to implement an autocomplete feature for my website. The basic idea is that I want to look for customer information based on their CustomerID number (primary key). So what I would like is that autocomplete should start making suggestion when I start typing in the CustomerID number into the textbox.
    I am using Visual Studio 2005 as the developing environment

    Thanks
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    My webmail does something similar. This does not require asp, however, I believe it is a java applet, although you could probably do the same thing with javascript.

    Jared

    Comment

    • gyanendar
      New Member
      • Jun 2007
      • 90

      #3
      TextBox remeber the past entry and whenever new entry comes it display the matchin one.
      Here i am finding where these entries get stored and how textbox retrieve those matching entry.
      Because i have to change the stored value.

      Thanks

      Comment

      • nkoriginal
        New Member
        • Nov 2006
        • 23

        #4
        You can use this example if you want it http://www.codeproject .com/jscript/jsactb.asp

        Is easy to implement and really good.

        If you need help with the connection to the database or show inputs in your page, just let me know.

        You can insert 2, 3 , 4, etc, inputs with autocomplete, working with the database

        If you need help, let me know
        NIKO

        Comment

        • gyanendar
          New Member
          • Jun 2007
          • 90

          #5
          Thanks for help.
          Here the value to be shown while filling textbox is stored in an array in <script> .
          For fetchig values for database what i need to do.I can store data in datatable or somewhere but how it'll get transfered to the array which stores the value.
          Or is there a way to fetch values from database using javascript.

          Thanks & Regards
          Gyanendar

          Comment

          • ilearneditonline
            Recognized Expert New Member
            • Jul 2007
            • 130

            #6
            Your best option is probably be using AJAX. You can add an event handler to the textbox for the onkeypress event. This could call a server side script that does a search.

            You can read my article from creating a Chart using AJAX to update it. It isn't exactly what you are looking for, but it will show you how to easily implement what you are looking to do.

            Comment

            Working...