Re: Dynamic list in Cakephp, how to do?

2007-12-06 Thread metasan

hi,

I had to do something similar recently.


The way you can do it :

You can add an Event on for the list2, so when the user click on it,
it will populate by an Ajax request to a function in your controller.
For the list2 observe the checkbox and use an Ajax request to get the
list1 populated and empty the list2.

let me know about your choice.

metasan


www.pieg.net
--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---



Dynamic list in Cakephp, how to do?

2007-12-06 Thread Steveston

I have a list and I need to populate it either with $array1 or
$array2. Both $array1 and $array2 are returned db query results. I
want to have a check box. So that when I ticket the checkbox, the list
will be populated with $array1; otherwise, use $array2 to populate the
list.

I think it is something has to be done via ajax, as I do not want to
reload the page.

Is there any available code for reference? Or any help on how to do
this?

Thanks,
--~--~-~--~~~---~--~~
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?hl=en
-~--~~~~--~~--~--~---