Using prototype or the stripped down version in moo.fx, you could do :

    document.getElementsByClassName('objective').each(
        function(element){
            element.onclick = function() {
                   //you code
                }               
            }           
        }
    );

also don't forget to let a correct behavior if javascript is disabled.

olivvv

[EMAIL PROTECTED] wrote:
> Hi all,
>
> now, I have a table that contains an hierarchy made like this:
>
> - objective
>   - goal (field 'father_id' = objective_id)
>     - practice (field 'father_id' = goal_id)
>
> now, how can I draw it in my view? I mean, everyone of these above has
> a "applicabile" field that is an enum like Y or N; I want a checkbox
> near all these elements and if I click on a father, for example to
> uncheck it, every child unchecks its box. I need Javascript? Please
> help...it's driving me mad!!
>
> Alberto
>
>
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to