6 messages in com.mysql.lists.perlRe: Optional select or enter data
FromSent OnAttachments
Dan Jones27 Aug 2003 06:59 
Gerhard Weber27 Aug 2003 07:20 
Leif W27 Aug 2003 07:27 
Chris Fleming27 Aug 2003 07:47 
Greg Meckes27 Aug 2003 12:13 
Leif W27 Aug 2003 13:19 
Subject:Re: Optional select or enter data
From:Gerhard Weber (g.we@computer-manufaktur.de)
Date:08/27/2003 07:20:34 AM
List:com.mysql.lists.perl

hi Dan

Ideally, I'd like a text field that that auto-fills in as you type, selecting the closest match from the existing authors so long as a match is found. (Hopefully, that's clear. The behavior is common but somewhat difficult to describe.) HTML doesn't appear to support anything near that level of sophistication. It should be possible to write a script to create the behavior, but reloading the page after each key press seems like a non-starter in terms of performance.

Something like this *can* be done with Javascript. You would need to dynamically generate a Javascript array with your authors' names, an update-function and an event-handler in your input fields (e.g. onKeyUp) calling the update function. Since this is a bit off topic, I keep it short: I once tried something similiar but the performance depended heavily a) the number of authors and b) your browser, so in the end I did not use it.

The only alternative I can come up with my limited knowledge is to have both a text field for new entires and a select field for existing entries. Surely there's a better way than that.

Sounds okay for me. Think of it as the price of a web application ;)

Greetings, gerhard