Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.26 and 1.27

version 1.26, 2003/06/20 16:13:06 version 1.27, 2003/07/11 16:07:20
Line 385  the selection box is set to document.$fo Line 385  the selection box is set to document.$fo
   
 $size: the size (number of lines) of the selection box.  $size: the size (number of lines) of the selection box.
   
   $onchange: javascript to use when the value is changed.  Enclosed in 
   double quotes, ""s, not single quotes.
   
 Returns: a perl string as described.  Returns: a perl string as described.
   
 =cut  =cut
Line 392  Returns: a perl string as described. Line 395  Returns: a perl string as described.
 ##############################################  ##############################################
 ##############################################  ##############################################
 sub StatusOptions {  sub StatusOptions {
     my ($status, $formName,$size)=@_;      my ($status, $formName,$size,$onchange)=@_;
     $size = 1 if (!defined($size));      $size = 1 if (!defined($size));
     if (! defined($status)) {      if (! defined($status)) {
         $status = 'Active';          $status = 'Active';
Line 409  sub StatusOptions { Line 412  sub StatusOptions {
   
     my $Str = '';      my $Str = '';
     $Str .= '<select name="Status"';      $Str .= '<select name="Status"';
     if(defined($formName) && $formName ne '') {      if(defined($formName) && $formName ne '' && ! defined($onchange)) {
         $Str .= ' onchange="document.'.$formName.'.submit()"';          $Str .= ' onchange="document.'.$formName.'.submit()"';
     }      }
       if (defined($onchange)) {
           $Str .= ' onchange="'.$onchange.'"';
       }
     $Str .= ' size="'.$size.'" ';      $Str .= ' size="'.$size.'" ';
     $Str .= '>'."\n";      $Str .= '>'."\n";
     $Str .= '<option value="Active" '.$OpSel1.'>'.      $Str .= '<option value="Active" '.$OpSel1.'>'.

Removed from v.1.26  
changed lines
  Added in v.1.27


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>