Subject: | Possible Typo (bug?) in auto_complete_field |
Hi, guys! First, congratulations for an excelent job on this Module.
When using the HTML::Prototype module from CPAN (v. 1.47) for creating
an autocomplete text field, the min_chars option didn't work as expected
(ajax search executed from first character, even when passing a
possitive value to min_chars). But documentation on
http://wiki.script.aculo.us/scriptaculous/show/Ajax.Autocompleter shows
the name for this argument is "minChars". So, in HTML/Prototype.pm, the
hash definition at the beginning of auto_complete_field subroutine:
my %to_options = (
'on_show' => 'onShow',
'on_hide' => 'onHide',
'min_chars' => 'min_chars',
'indicator' => \'indicator',
'select' => \'select',
);
probably should be
my %to_options = (
'on_show' => 'onShow',
'on_hide' => 'onHide',
'min_chars' => 'minChars',
'indicator' => \'indicator',
'select' => \'select',
);
I tested this modification locally and it works as expected. Maybe you
could add this for future releases (or point me at contributing, since
i'm kind of a newbie :) ).
On the same script.aculo.us wiki page there are some other options
illustrated (updateElement and afterUpdateElement) that don't seem
supported in HTML::Prototype. Any pointers, if you please, for
incorporating such capabilities, if they're relevant enough? (at least,
they would be for me)... Would it be sufficient to add updateElement and
afterUpdateElement keys/values to %to_options?
Thanks a lot!
Juan M. Paredes A.
Distribution Name: HTML-Prototype-1.47
Perl Version: v5.8.8 built for i486-linux-gnu-thread-multi
OS: Linux debian 2.6.8-2-386 #1 Tue Aug 16 12:46:35 UTC 2005 i686 GNU/Linux