Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 12th, 2005, 02:12 PM
Registered User
Join Date: Feb 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default autocomplete text field

i have found several snippets online for using javascript to auto complete a text field on a web form. i have one issue that hopefully someone can shed some light on. i have a very large product guide (30,000 +/- items) and want to autocomplete text on a recipe form with these products. the examples i have found all use arrays to store the key words. i can't believe it would be very efficient to keep an array of this many items in the memory. is there a more efficient way to do this? also i need to limit this row to the list, as i am not going to give the user read/write priveledges on the database. thanks in advance for any advice.

Reply With Quote
  #2 (permalink)  
Old February 12th, 2005, 03:43 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts

If you want to use a client side solution, JavaScript (or VBScript) is your only option.

Indeed, 30,000 items will give you very bad performance. JavaScript isn't a really fast language, especially not when you're dealing with so many items.

The only solutions I can think of that performs well are a) not a web solution, but a compiled application with a direct database connection or b) a server side solution where the user enters the first few characters and then forces a postback to limit the list to the items that match the selection....


Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Interlude by Muse (Track 7 from the album: Absolution) What's This?
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGridView autocomplete pencilneck Visual Studio 2005 5 July 21st, 2016 07:01 AM
Convert Text(Sql Server Text Field) to Image(JPG) srinivas72 ADO.NET 2 February 13th, 2009 06:31 PM
how to use autocomplete feature in listbox? shiva srivastava ASP.NET 1.0 and 1.1 Basics 7 August 20th, 2007 04:05 AM
autocomplete textbox like google nilsan ASP.NET 1.0 and 1.1 Basics 1 February 27th, 2007 07:36 AM
autocomplete textbox like google nilsan ASP.NET 1.0 and 1.1 Professional 0 February 27th, 2007 05:32 AM

All times are GMT -4. The time now is 12:43 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.