Re: Problem with <SELECT MULTIPLE> in Mech (maybe in HTTP::Form as well?)

Hal Vaughan <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Organization Threshold Digital, Ltd.
Message-ID <[email protected]>
On Thursday 14 July 2005 05:04 pm, Andy Lester wrote:
> On Thu, Jul 14, 2005 at 05:01:40PM -0400, Hal Vaughan 
([email protected]) wrote:
> > Does anyone have examples of <SELECT MULTIPLE> objects (like a url or
> > sample HTML code) that don't have this problem, or is it a bug that
> > nobody's realized yet because there aren't many cases of people needing
> > to use multiple selects?  (Or is it a "feature" that I just don't fully
> > appreciate?)
>
> I THINK it's an issue down at the HTML::Form level.

I figured it was more at the form level, since the problem persisted with the 
Option object, which was from the Form object.  After reading your post, I 
re-read the HTTP::Form doc on CPAN.  I missed this the first time around, but 
I did find this:

"For a <select> element without the multiple attribute there will be one input 
object of type of "option". For a <select multiple> element there will be one 
input object for each contained <option> element. Each one of these option 
objects will have the same name."

So I figure this isn't a bug, but is the way this is handled.  It's damned 
frustrating.  It means you have to handle setting values for a <select 
multiple> completely differently from a non-multiple select.

The part I find frustrating is that I won't know how well this works until I 
submit the form to the site I'm dealing with, and that means I pay for a 
report.  Is there some way to find out, before calling $form->submit() what 
will be POSTed when the form/page is submitted?

Hal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.