• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

autocomplete and callback

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I am new in JS. I have this search box with auto-complete. getting the data for auto-complete takes longer than the JS code so I have to use callback. I dont know what am I doing wrong but while debugging it just jumps over the auto complete and I dont see any suggestion list. although when I check in start2 function, part callback(d) variable d is filled perfectly. every thing is fine until I call autocomplete. in line $("#searchtxt").autocomplete({//here it doesnt go here and just jumps to the next });. I guess I am doing something wrong there but I dont know what?


and this is start2:


Thank you so much!
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As it is clear you are already using jQuery, why on earth are you re-inventing the wheel rather than using one of the established jQuery plugins for autocomplete?
 
reply
    Bookmark Topic Watch Topic
  • New Topic