dear cakePHP dvelopers ,

Plz help me in my autocomplete program.

here i adding my program code...hv a look on it,

controller function
-------------------------

<?php
class AutocompletesController extends AppController {

        var $name = 'Autocompletes';

        var $uses = array();
        var $helpers = array("Html","Form","Javascript","Ajax");
        function index() {

                $this->layout = 'ajax';
                //$this->set('items',$this->Autocomplete->find('all',array
('recursive =>3')));

              $this->Autocomplete->recursive = 0;
                $this->set('autocompletes', $this->paginate());
                //echo "hello";

        }
        function getData(){

                $this->layout = 'ajax';
                $this->set('items',$this->Autocomplete->find('all',array()));

}
}
?>
getData.ctp
---------------

<ul>

<?php foreach($items as $item): ?>
<li><?php echo $item; ?></li>
<?php endforeach; ?>
</ul>

anybody can correct the code in getData funcion or anywhrer.? or
getData.ctp file.

help me for ajax function page and css , js file .

regards,
                jiru.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to