p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Dreamweaver (all versions) (http://p2p.wrox.com/forumdisplay.php?f=58)
-   -   autocomplete text field (http://p2p.wrox.com/showthread.php?t=25501)

Frosty1 February 12th, 2005 02:12 PM

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.


Imar February 12th, 2005 03:43 PM

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?


All times are GMT -4. The time now is 11:23 AM.

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