Connecting Tech Pros Worldwide Forums | Help | Site Map

checkbox group checking (DOM)

uoziod@gmail.com
Guest
 
Posts: n/a
#1: Aug 16 '06
Hello.

Sorry for my english :)

I got a next problem. This is a HTML.

<ul>
<li id="cat3"><input type="checkbox"
onChange="javascript:groupCatCheck('3', this)" name="categories[]"
value="3" />(3)</li>
<ul>
<li id="cat5"><input type="checkbox"
onChange="javascript:groupCatCheck('5', this)" name="categories[]"
value="5" />(5)</li>
<li id="cat8"><input type="checkbox"
onChange="javascript:groupCatCheck('8', this)" name="categories[]"
value="8" />(8)</li>
<ul>
<li id="cat15"><input type="checkbox"
onChange="javascript:groupCatCheck('5', this)" name="categories[]"
value="15" />(15)</li>
<li id="cat18"><input type="checkbox"
onChange="javascript:groupCatCheck('8', this)" name="categories[]"
value="18" />(18)</li>
</ul>
</ul>
</ul>

So, I need check all children group if I'll checking one parent
checkbox.
I'm using javascript function, that runing thru childNodes... but when
I trying to call this function inside itself all future nodes are
disappears :(
Can anybody help my mind? :(((


Matt Kruse
Guest
 
Posts: n/a
#2: Aug 16 '06

re: checkbox group checking (DOM)


uoziod@gmail.com wrote:
Quote:
So, I need check all children group if I'll checking one parent
checkbox.
Can anybody help my mind? :(((
In your case it might be easier to use a library that does the internal work
for you:
http://www.javascripttoolbox.com/lib/checkboxgroup/

Hope that helps,

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com


uoziod
Guest
 
Posts: n/a
#3: Aug 17 '06

re: checkbox group checking (DOM)


In your case it might be easier to use a library that does the internal work
Quote:
for you:
http://www.javascripttoolbox.com/lib/checkboxgroup/
>
Hope that helps,
Yes!!! Really! Thank you very much!

Closed Thread