% unless ( $opt{'js_only'} ) { % } <%init> my %opt = @_; my $labels = $opt{'option_labels'} || $opt{'labels'}; my $curr_value = $opt{'curr_value'}; my $onchange = ''; if ( $opt{'onchange'} ) { $onchange = $opt{'onchange'}; $onchange .= '(this)' unless $onchange =~ /\(\w*\);?$/; $onchange =~ s/\(what\);/\(this\);/g; #ugh, terrible hack. all onchange #callbacks should act the same $onchange = 'onChange="'. $onchange. '"' unless $onchange =~ /^onChange=/i; } $opt{'disabled'} = &{ $opt{'disabled'} }( \%opt ) if ref($opt{'disabled'}) eq 'CODE'; $opt{'disabled'} = 'DISABLED' if $opt{'disabled'} && $opt{'disabled'} !~ /disabled/i; # uuh... yeah? my @style = ref($opt{'style'}) ? @{ $opt{'style'} } : $opt{'style'} ? ( $opt{'style'} ) : (); my $style = scalar(@style) ? 'STYLE="'. join(';', @style). '"' : '';