while ($prepare_select_hosts->fetch()){ print $cgi->Tr( $cgi->td({-width=>'20'},$id), $cgi->td($hostname), $cgi->td($ip), $cgi->td($cgi->checkbox(-name=>'host', -label=>'', -checked=>"$status", -value=>"$ip")) ); } print $cgi->Tr({-height=>'15'}, ""); print $cgi->Tr( $cgi->td({-colspan=>'2'}, $cgi->button(-name=>'check', -value=>'Select All', -onClick=>"location.href='/cgi-bin/passwd/passwd.pl?status=1'"), $cgi->button(-name=>'check', -value=>'Unselect All', -onClick=>"location.href='/cgi-bin/passwd/passwd.pl?status=0'") ));