Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 12th, 2005, 01: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, 02:43 PM
Imar's Avatar
Wrox Author
Points: 71,611, Level: 100
Points: 71,611, Level: 100 Points: 71,611, Level: 100 Points: 71,611, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,008
Thanks: 79
Thanked 1,575 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?
Reply With Quote
Reply


Thread Tools
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 05: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 06:36 AM
autocomplete textbox like google nilsan ASP.NET 1.0 and 1.1 Professional 0 February 27th, 2007 04:32 AM



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


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