Hi folks,
I've been working on this for a while now and getting mighty
frustrated.
I'm trying to use the $ajax->autoComplete method and I'm stuck.
Firebug is showing that I am sending the POST successfully to my
controller and even getting a response back. When I look at the
updated DOM, I see this:
<div id="AjaxName_autoComplete" class="auto_complete" style="display:
none;">response from "autocomplete_friends_of" is successfully
showing</div>
Notice the style="display:none" that is in this auto-generated
autocomplete field! Why would Cake do this, and how do I get rid of
it so I can see the AJAX results?!
Here's my code....
-VIEW (messages/index.thtml):
echo $ajax->autoComplete('ajax_name',
'/messages/autocomplete_friends_of/'.$u['User']['id'],
array(
'minChars' => 2
)
);
-CONTROLLER (messages.php):
function autocomplete_friends_of($id='') {
// action logic
....
$this->set('data',$data);
$this->render(NULL,'ajax');
}
-VIEW (autocomplete_friends_of.thtml):
// view logic
...
echo response from "autocomplete_friends_of" is successfully
showing';
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---