If you see in example in given link the code changed for you will be <?php echo $this->Js->get('#parentdropdownid')->event->('change',$this->JS->request(array(
'controller'=>'controllername', //where request will be processed 'action'=>'actionname'), array( 'update'=>'#idofchildcategory', 'async'=>true, 'dataExpression'=>true, 'method'=>Post, 'data'=>$(this).serialize()'), false)) ?> You can look up for jQuery Ajax request help in case you are unable to understand any parameters.. On 27-Sep-2013 5:49 AM, "Raks" <kaur....@gmail.com> wrote: > But how to use it. > M new to Cakephp. > I have tried a lot looking at various different examples. Nothing works. > > On Wednesday, September 25, 2013 8:02:35 PM UTC-7, gaurav wrote: >> >> You will need.to.use js helper here I suppose you are using cake 2.0 see >> this link >> http://itfeast.blogspot.in/**2013/06/cakephp-20-create-** >> 0bserve-field.html?m=1<http://itfeast.blogspot.in/2013/06/cakephp-20-create-0bserve-field.html?m=1> >> On 26-Sep-2013 5:33 AM, "Raks" <kaur...@gmail.com> wrote: >> >>> Hi, >>> >>> I have a sql table having columns id, parent_id and title. All items >>> with with parent_id =0 are parents and should appear in a dropdown list. >>> That I have done. Now I want another dropdown that on selection of parent, >>> shows all the children of that parent. I am working on cakephp MVC >>> framework. >>> There's only one database table so having a controller , model for that >>> and have to have both the drop down in same view. >>> Like on selection of first value, second dropdown should show only the >>> child elements of that parent to select. >>> >>> Any help. >>> >>> Thanks >>> >>> -- >>> Like Us on FaceBook >>> https://www.facebook.com/**CakePHP<https://www.facebook.com/CakePHP> >>> Find us on Twitter http://twitter.com/CakePHP >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "CakePHP" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to cake-php+u...@**googlegroups.com. >>> To post to this group, send email to cake...@googlegroups.com. >>> Visit this group at >>> http://groups.google.com/**group/cake-php<http://groups.google.com/group/cake-php> >>> . >>> For more options, visit >>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >>> . >>> >> -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to cake-php+unsubscr...@googlegroups.com. > To post to this group, send email to cake-php@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php. > For more options, visit https://groups.google.com/groups/opt_out. > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.