File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes autocomplete and callback Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "autocomplete and callback" Watch "autocomplete and callback" New topic

autocomplete and callback

sahar eb
Ranch Hand

Joined: May 06, 2009
Posts: 38
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

Joined: Jan 10, 2002
Posts: 63542

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?

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: autocomplete and callback
It's not a secret anymore!