To get the same effect, using just CGI methods, we need additional 'SUBMIT' button.
Using javascript 'onChange' method is more natural way in this case.
More real example:
Here
Author:
David Stricker
Change Background Color:
yellow
green
red
blue
white
------------------------------------------------ sub change_bg { my $str = qq(
); for ( 'yellow','green','red','blue','white' ) { my $select = (( $_ eq $bg ) ? " SELECTED" : ""); $str .= qq(
$_\n); } $str .= "
"; return $str; }
Return Back