Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Fast JavaScript Autocomplete

Posted on 2007-12-06
4
Medium Priority
?
1,268 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 500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

718 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