PDA

View Full Version : Not sure what or how to do this


mr_evans2u
02-27-2003, 09:03 PM
I'm not sure how to go about this problem. I have a web page that uses dropdown boxes which gives choices for the user. In the code before there was only one choice for $Area(MatchArea), now I have several choices which the user can select more than one for $Area. My problem is I don't know what or how to write the perl code to allow the multiple selected choices.
Can anyone help me please?

sub build_sieve_statements
{
my $name = param('SecName');
my $Test = param('TestValue');
my $Match = param('MatchType');
my $Area = param('MatchArea');
my $Type = param('ActionType');

$if_breaker = '#' . $name . '#';
$header_line = 'if ' . $Test . ' :' . $Match . ' ["' . $Area . '"]';
$discard_line = '{' . $Type . ';';
$stop_line = 'stop;}';
}
### section from HTML ####
### there are several selections from a javascript that populates this. ###

<B>Area:&nbsp;</B>
<select multiple size="1" name="MatchArea" onChange="ReDirect3(this.options.selectedIndex)">
<option value=" " > </option>
<option value=" " >---Select---</option>
<option value=" " >---Select---</option>
</select>

optimism_
02-27-2003, 11:30 PM
never tried multiple seleect boxes before, but in this situation, i would probably write a small script to dump all parameters passed to it to screen in a neat html table, then send the script the data from your form with the multiple select.

This way you can see how the data is sent, and you can see how best to deal with it

orangehairedboy
03-01-2003, 05:16 AM
Try http://www.tneoh.zoneit.com/perl/CGI_LIB/form_urlenc.html.

Lewis