Solved

Fast JavaScript Autocomplete

Posted on 2007-12-06
4
1,264 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn how to dynamically set the form action using jQuery.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

751 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