Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

HTML::Form, Multiple select Elements with Same name
Hi all,

I have a form that has multiple <select> elements that have the same
name.  This is so that the destination script can deal with all of them
as an array.  <select multiple> is not appropriate because the order in
which options are chosen is significant.

A simple version of the form might be

<form action="foo.pl" method="POST">
<select name="m">
<option>a
<option>b
<option>c
</select>
<select name="m>
<option>a
<option>b
<option>c
</select>
<input type="submit">
</form>

Works great.  The handler script works wonderfully.

However, when I try to test it all with WWW::Mechanize, there's a
problem with HTML::Form, which parses it out to be (effectively) a
single select with 6 options.

I don't see anyway to make HTML/Form.pm parse this correctly without one
of several really unpleasant modifications.  I don't want to have to
change the names of the <select> elements to be unique (e.g. m1, m2),
because then I'd have to add code to the handler script to put these
parameters into an array.  I get that effect automatically with the
current naming.

Comments/thoughts/suggestions?

Report this thread to moderator Post Follow-up to this message
Old Post
David Marshall
07-31-04 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Modules archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:26 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.