Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 12th, 2005, 02:12 PM
Registered User
 
Join Date: Feb 2005
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.

 
Old February 12th, 2005, 03:43 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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....

Cheers,

Imar
---------------------------------------
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?





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





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