• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

autocomplete and callback

 
sahar eb
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • 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!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic