WWW-Mechanize - Cannot select multiple?

Posted on Mon Jan 22 02:44:45 2007 by leonio
Cannot select multiple?
Hello, I am trying to use Mechanize to set select multiple (the form field is named form_category_ids[]). No matter how I try to do it, it fails although form dump and mech-dump do see the select and the value I try to select. May this be due to the [] brackets? Or to the fact the html is utf-8 and has some ethnic characters? WWW:Mechanize is version 1.20. Any advice is welcome. Thanks l.
The error: Tk::Error: Illegal value '15' for field 'form_category_ids[]' at /usr/local/share/perl/5.8.8/WWW/Me +chanize.pm line 1199 Carp::croak at /usr/share/perl/5.8/Carp.pm line 102 HTML::Form::ListInput::value at /usr/share/perl5/HTML/Form.pm line 1133 HTML::Form::value at /usr/share/perl5/HTML/Form.pm line 457 WWW::Mechanize::select at /usr/local/share/perl/5.8.8/WWW/Mechanize.pm line 1199 The dump: form_category_ids[]=<UNDEF> (option) [*<UNDEF>/off|22/Derechos] form_category_ids[]=<UNDEF> (option) [*<UNDEF>/off|21/Educacion] form_category_ids[]=<UNDEF> (option) [*<UNDEF>/off|3/Arte y Cultura] form_category_ids[]=<UNDEF> (option) [*<UNDEF>/off|15/Media] form_category_ids[]=<UNDEF> (option) [*<UNDEF>/off|13/Trabajo] The form: <select id="form_category_ids" name="form_category_ids[]" size="8" multiple="multiple"> <option value="22">Derechos</option> <option value="21">Educacion</option> <option value="3">Arte y Cultura</option> <option value="15">Media</option> <option value="13">Trabajo</option> </select>
Write a response