version 1.5, 2002/07/26 16:22:09
|
version 1.6, 2002/08/01 20:49:06
|
Line 30 package Apache::lonhtmlcommon;
|
Line 30 package Apache::lonhtmlcommon;
|
|
|
use strict; |
use strict; |
|
|
|
sub AscendOrderOptions { |
|
my ($order, $page, $formName)=@_; |
|
|
|
my $OpSel1 = ''; |
|
my $OpSel2 = ''; |
|
|
|
if($order eq 'Ascending') { |
|
$OpSel1 = ' selected'; |
|
} else { |
|
$OpSel2 = ' selected'; |
|
} |
|
|
|
my $Str = ''; |
|
$Str .= '<select name="'.(($page)?$page:'').'Ascend"'; |
|
if($formName) { |
|
$Str .= ' onchange="document.'.$formName.'.submit()"'; |
|
} |
|
$Str .= '>'."\n"; |
|
$Str .= '<option'.$OpSel1.'>Ascending</option>'."\n". |
|
'<option'.$OpSel2.'>Descending</option>'."\n"; |
|
$Str .= '</select>'."\n"; |
|
|
|
return $Str; |
|
} |
|
|
sub MapOptions { |
sub MapOptions { |
my ($data, $page)=@_; |
my ($data, $page, $formName)=@_; |
my $Str = ''; |
my $Str = ''; |
$Str .= '<select name="'; |
$Str .= '<select name="'; |
$Str .= (($page)?$page:'').'Map">'."\n"; |
$Str .= (($page)?$page:'').'Maps"'; |
|
if($formName) { |
|
$Str .= ' onchange="document.'.$formName.'.submit()"'; |
|
} |
|
$Str .= '>'."\n"; |
|
|
my $selected = 0; |
my $selected = 0; |
foreach my $sequence (split(':',$data->{'orderedSequences'})) { |
foreach my $sequence (split(':',$data->{'orderedSequences'})) { |