Re: Design an hirearchy?

2006-07-10 Thread [EMAIL PROTECTED]

Sorry for the late response; I got it with PHP directly simply by using
a field in my MySQL record named father_id and doin' some FOR cycles
to print it out correctly so that it seems a real tree. Now, for the
checkboxes question...well, I used a form for every object and I used a
Submit button to change its state; it seems a rude solution but, for
now, it works.


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



Design an hirearchy?

2006-06-28 Thread [EMAIL PROTECTED]

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Design an hirearchy?

2006-06-28 Thread Olivier Percebois-Garve

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---