|< 1 2 >| | 15 Einträge, 2 Seiten |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
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'") ));
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<script type="text/javascript">
<!--
function AllMessages()
{for(var x=0;x<document.form1.elements.length;x++)
{var y=document.form1.elements[x];
if(y.name!='ALLMSGS') y.checked=document.form1.checkall.checked;
}
}
//-->
</script>
[...]
<td><input type="checkbox" name="host" value="HOSTNAME1" /> HOSTNAME1</td>
<td><input type="checkbox" name="host" value="HOSTNAME2" /> HOSTNAME2</td></tr>
<tr><td><input type="checkbox" name="checkall" onclick="AllMessages(this.form);" /> alle markieren</td></tr>
1 2 3 4 5 6 7 8
print $cgi->header( -type=>'text/html'); print $cgi->start_html( -dtd => '-//W3C//DTD XHTML 1.0 Transitional//EN', -title=>'Test', -style=>{'src'=>"https://10.255.253.7/passwd/styles.css"}, -script=>{ -language=>'JavaScript', -src=>'checkall.js'} );
1 2 3 4 5 6 7 8 9 10
print "<script type=\"text/javascript\"> <!-- function AllMessages() {for(var x=0;x<document.form1.elements.length;x++) {var y=document.form1.elements[x]; if(y.name!='ALLMSGS') y.checked=document.form1.checkall.checked; } } //--> </script>";
1 2 3 4 5 6 7 8 9 10 11
my $JSCRIPT=<<END; function AllMessages() {for(var x=0;x<document.form1.elements.length;x++) {var y=document.form1.elements[x]; if(y.name!='ALLMSGS') y.checked=document.form1.checkall.checked; END print $cgi->start_html( -dtd => '-//W3C//DTD XHTML 1.0 Transitional//EN', -title=>'Remote Password Changer', -style=>{'src'=>"https://10.255.253.7/passwd/styles.css"}, -script=>$JSCRIPT);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
print $cgi->start_form({-id=>'form1',-name=>'form1',-action => "$url/cgi-bin/passwd/ssh.pl", -method=>'post'}); [...] 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', -value=>"$ip")) ); } print $cgi->Tr($cgi->td( $cgi->button(-name=>'checkall', -value=>'Check All', -onClick=>"AllMessages(this.form);"));
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
my $js = q~ function checkAll(field) { for(i=0;i<field.length; i++) field[i].checked=true; } function uncheckAll(field) { for(i=0;i<field.length;i++) field[i].checked=false; } ~; [...] print $cgi->start_form({-name=>'form1',-action => "/pfad/script.pl", -method=>'post'}); print $cgi->start_table({-bordercolor=>'#cccccc', -bgcolor=>'#ffffff', -border=>'0', -width=>'700'}); 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=>'', -value=>"$ip")) ); } print $cgi->Tr( $cgi->td({-colspan=>'3'}, $cgi->button(-name=>'checkall', -value=>'Check All', -onMouseOver =>"this.style.color = '#FF0000'", -onMouseOut => "this.style.color = '#000000'", -onClick=>"checkAll(document.form1.host);"), $cgi->button(-name=>'uncheckall', -value=>'Uncheck All', -onMouseOver =>"this.style.color = '#FF0000'", -onMouseOut => "this.style.color = '#000000'", -onClick=>"uncheckAll(document.form1.host);"), )); print $cgi->end_table(); print $cgi->end_form(); [...]
1 2 3 4 5
$cgi->button(-name=>'checkall', -value=>'Check All', -onMouseOver =>"this.style.color = '#FF0000'", -onMouseOut => "this.style.color = '#000000'", -onClick=>"checkAll(this.form.host);"),
|< 1 2 >| | 15 Einträge, 2 Seiten |