Hej Anonimous monk(s),

I listened to your advices and found a way to get it done with a lot of help from web of course (it showed then if you search in english you get a lot more hits then when you're searching in swedish ;-) ). It ended up with a code like this :

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


In reply to Re^2: How to uncheck one checkbox if some other is checked by SerZKO
in thread How to uncheck one checkbox if some other is checked by SerZKO

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.