logo       
Google Custom Search
    AddThis Social Bookmark Button

HTML::Form and <select multiple="">: msg#00009

Subject: HTML::Form and <select multiple="">
Hi,

I noticed a change to HTML::Form::ListInput's add_to_form() method between versions 5.79 and 5.800 of libwww-perl (revisions 1.39 and 1.44 of HTML/Form.pm) that I'm not sure was intentional. Previously, a <select> tag like this:

  <select name="foo" multiple="">

was interpreted as a multiple select menu. In the newer versions, it is not. As far as I can tell from the HTML specs, that's illegal HTML (it should just be multiple, or multiple="multiple", or nothing). But I think the old way that Form.pm interpreted it is more realistic, and it conforms with the way I've seen it work on a couple of browsers.

This would be a patch for Form.pm revision 1.49 (libwww-perl-5.803):

1009c1009
<     if ($type eq "option" && $self->{multiple}) {
---
>     if ($type eq "option" && exists $self->{multiple}) {

Apologies if this has already been discussed -- I just joined the list to put it out there.

Josh Rai




Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>