This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 60767

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] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: autocomplete and callback
Similar Threads
Making Two different function run on same element but for different events.
jquery, ajax, servlet and null data in callback function
jQuery autocomplete problem
Pop up calendar Problem
Page section does not update after call of a4j:support in IE 9