Reputation: 183
Im new to both cakephp2 and jquery, and I need some help.
I have two .ctp files, one is to display a list of datas from the database (vertical_list.ctp) and another .ctp contains the button to display 10 more data in the list.
<div class="loading" style="text-align:center"><a href="javascript:void(0);" id="loadmore">Display 10 more</a></div>
It is a Element (more_data.ctp) .
I have $this->element('Mobile/more_data);
element in the vertical_list.ctp and I want to call the javascript function but I'm not sure how to do this.
Upvotes: 1
Views: 60
Reputation: 1852
Use something like the sample below . I'm new to cakephp2 myself but I was able to access the js scripts function.
sample $this->Js->Action();
Upvotes: 1