![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
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 -- MySQL Perl Mailing List For list archives: http://lists.mysql.com/perl To unsubscribe: http://lists.mysql.com/perl?unsub=gr...ahoo (DOT) com |
#2
| |||
| |||
|
|
Here's something that you might be able to use: http://www.mattkruse.com/javascript/autocomplete/ You would just have to change the Perl script to populate the select menu, or use hidden fields. Greg --- Gerhard Weber <g.weber (AT) computer-manufaktur (DOT) de> wrote: 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 -- MySQL Perl Mailing List For list archives: http://lists.mysql.com/perl To unsubscribe: http://lists.mysql.com/perl?unsub=gr...ahoo (DOT) com __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- MySQL Perl Mailing List For list archives: http://lists.mysql.com/perl To unsubscribe: http://lists.mysql.com/perl?unsub=wa... usa (DOT) net |
![]() |
| Thread Tools | |
| Display Modes | |
| |