Solved

Fast JavaScript Autocomplete

Posted on 2007-12-06
4
1,261 Views
Last Modified: 2013-11-19
I'm looking for an autocomplete script that I can use on my LAMP platform.

I have tried scriptaculous and it works fine but in IE it is VERY VERY VERY slow and unusable. The datasets being returned are quite large too.

The user is inputting country codes for phone numbers. So after they enter one digit, quite a few results come back, for instance, after you type the number '1', 1250 results are returned. Perhaps I could be smarter about the results, right now I am just querying  for 'textbox.value%' in the database.

Scriptaculous also seems to work kind of quirky in IE, but works great in FF and Safari.
0
Comment
Question by:dignified
4 Comments
 
LVL 11

Accepted Solution

by:
raj3060 earned 125 total points
ID: 20419575
get the number of results first,  if you get too many results then don't apply autocomplete. This would reduce the execution time. Which would be the case when user is entering only one character, for two or more characters search would be more refined and you would get less results.
0
 

Author Comment

by:dignified
ID: 20562378
It is tough though because I am going by dialing codes so if I enter "1", the most common one for the United States, if I query for '1%' I get about 1200 results. I can't really wait for more to be entered, because 1 is pretty common.

Are there any other scripts out there besides scriptaculous?
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20953159
Forced accept.

Computer101
Community Support Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now