1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Auto Suggest with Javascript

Discussion in 'JavaScript and AJAX' started by pradeep, Jun 14, 2005.

  1. andrejc

    andrejc New Member

    Joined:
    Jan 21, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Thanks a lot. When i googled up for autocompletion I first encountered a bunch of sites saying its imposible or sugesting visualy improper solutions.

    However, I use prototype framework (1.6) to send the data to javascript and the code did not work. All your arrays get filled with functions from prototype.js as objects. I didn't look up where's the object collision, I just replaced all the for(var i in array) with for(i=0; i<array.lenght; i++) in your script and its working fine so far.

    Thanks again!
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    Yeah I encountered this problem a few months back, and the solution was same like yours! :)
     
  3. anavarro

    anavarro New Member

    Joined:
    Mar 27, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello,
    I've recently used this code and it works wonderful! However, when I opened it up in MS IE 6.0 it beahves differently. The TEXTBOX seems to be off centered and the autocomplete=off seems to have no effect.

    Is there a trick in order to use it in MS IE?

    Thanks
     
  4. MrSlate

    MrSlate New Member

    Joined:
    Jun 3, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Perfect! Thanks!!

    MrSlate
     
  5. neenajaiswal

    neenajaiswal New Member

    Joined:
    Jun 23, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    I have newly joined this forum. Thanks very much , Pradeep for this wonderful solution. How can I create this auto-suggest feature with data to be dynamically built from Oracle table?
     
  6. neenajaiswal

    neenajaiswal New Member

    Joined:
    Jun 23, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Thanks for the solution. I need the list to be built from data from Oracle tables. How do I do this?

    Neena Jaiswal
     
  7. David Michael

    David Michael New Member

    Joined:
    Jul 6, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    I also have same problem, I want to figure out how to create data in an oracle tables.
     
  8. Mysticfalcon

    Mysticfalcon New Member

    Joined:
    Jul 22, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello, thanks for your perfect job.

    But there is a problem, it doesn't work on special characters like "Ü, ü, Ç, ç, Ö, ö". How can we solve this problem ?
     
  9. daya_lv

    daya_lv New Member

    Joined:
    Oct 26, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi Pradeep,
    This is very helpful to me. Works very well. but my data set has "&" in it. e.g. - Abc & Abc. In such case the drop down shows text as "Abc & Abc" but the text box shows it as "Abc &amp; Abc". Can you help with this one please?
     
  10. venami

    venami New Member

    Joined:
    Dec 26, 2008
    Messages:
    195
    Likes Received:
    10
    Trophy Points:
    0
    Occupation:
    Software Professional
    Location:
    India, Tamil Nadu, Cuddalore
    Home Page:
    This is really superb :)
     
  11. kuttappan

    kuttappan New Member

    Joined:
    Jan 12, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    thanx a lot dude!!...u really helped me
     
  12. dd_fadhilah

    dd_fadhilah New Member

    Joined:
    Dec 27, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    your work's great... but the list is static and not from database. From thread 'source code for autosuggest' u've suggested to see your solution... but it seems no solution given...hmm...
     
  13. amoremia

    amoremia New Member

    Joined:
    Feb 20, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Thanks a lot for the solution. I have a problem though. The code works like a charm for one text input box. However, when I create more than one boxes (I need multiple entry from the same array) the code does not work for the other boxes but only for the first one.
    I would really appreciate the help.

    regards
     
  14. ahmed-mehmood

    ahmed-mehmood New Member

    Joined:
    May 1, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    where i will make changes if i want to fetch the data from the database . ?? i want to use php ... please do reply ASAP ..
     
  15. Arthanarisamy

    Arthanarisamy New Member

    Joined:
    Apr 10, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Thanks a lot! I was asking for this only exactly! Its really helpful!
     
  16. Arthanarisamy

    Arthanarisamy New Member

    Joined:
    Apr 10, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Can you also help me in displaying the names which is there in the database!


    Instead giving all the names in the script, i will maintain a table named names.

    So i should retrive those names and should display it in the suggestion box same way how you have did using javascript suggestion box!
     
  17. drillbabydrill

    drillbabydrill New Member

    Joined:
    Nov 12, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hello, I'm trying to use this code but it's not working. I added the html code to my site and I saved the java code as AutoComplete.js and added it to my site too. is this correct? how does the html file "connect" to the java file. I don't think one knows where the other is. I know nothing about java. help please. thank you.
     
  18. amit24x7

    amit24x7 New Member

    Joined:
    Jul 11, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    I am getting this example done, but once i choose option from drop down and enter then input box is getting clear, i am not getting value in input box what i have selected. Please help
     

Share This Page