my $JCHECK=<<END;
function CheckBoxes() {
if((document.getElementById("P").checked == true) || (document.get
+ElementById("F").checked == true) || (document.getElementById("K").ch
+ecked == true)) {
document.getElementById("Ej").checked = false;}
else {document.getElementById("Ej").checked = true;}
}
END
I changed then header to this print $qry->start_html(-title => "L\xE4gg till",
-lang => 'sv',
-bgcolor => "#336699",
-script => $JCHECK, #ADDED
-style => {
-code => '
body,p,b,i,em,dt,li,div,th,td,Tr,u,optio
+n,form,dd,dl,sl {
font-family: Arial, sans-serif;
font-size: 12px; color: #FFFFFF; }
a {font-family: Arial, sans-serif; font-
+size: 14px; color: #FFFFFF;}
h1 {font-family: Arial, sans-serif; font
+-size: 30px; color: #FFFFFF;}
h2 {font-family: Arial, sans-serif; font
+-size: 18px; color: #FFFFFF;}
h3 {font-family: Arial, sans-serif; font
+-size: 18px; color: #FFFFFF;}
',
},
);
And checkboxes are not now checkbox_group (which was very convinient to write), but independant checkboxes. Like this :
print $qry->table ({ Border => 1, Cellpadding => 3, bordercolor =>"#FF
+FFFF"},
Tr(
td(checkbox(-name => 'P', -id =>'P', -value=> 'Pri', -onClick =>
+ "CheckBoxes()")),
td(checkbox(-name => 'F', -id =>'F', -value=> 'For', -onClick =>
+ "CheckBoxes()")),
td(checkbox(-name => 'K', -id =>'K', -value=> 'Kap', -onClick =>
+ "CheckBoxes()")),
td(checkbox(-name => 'Ej',-id =>'Ej', -value=> 'Ej', -checked =>
+ 'checked', -onClick => "CheckBoxes()")));
and it seems to be working, but only for the first row, så I have to add some iteration somehow but I hope to find it somewhere on the web.Might be usefull to someone
|