Hi all.
I am having some problem with the autocomplete tutorial.
So anyone please let me know wut am i missing?
Yes I did put both ajax /html / and autocomponent.
and also added the js on the file.
tasks_appcontroller.php
function autocomplete ()
{
$this->set('tasks', $this->Task->findAll("title LIKE '{$this-
>data['Task']['title']}'"));
$this->layout = "ajax";
}
index.thtml
<form action="/users/index" method="POST">
<?php echo $ajax->autoComplete('Task/title', '/tasks/
autoComplete')?>
<?php echo $html->submit('View Task')?>
</form>
autocomplete.thtml
<ul>
<?php foreach($tasks as $task): ?>
<li><?php echo $task['Task']['title']; ?></li>
<?php endforeach; ?>
</ul>
thanks in advances.
andy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---