Hi all.
I'm using MooTools 1.2.4 and CakePHP 1.3. I'm attempting to get
Autocompleter.Ajax.Json() working, but I'm not seeing the result list. Firebug
is letting me know that the query is returning the correct results, but still
not seeing anything. From the Cake side of things, am I approaching this the
correct way?
<?php
// /app/controllers/hardwares_controller.php
class HardwaresController extends AppController {
public function config () {
$options = array(
'conditions' => array(
'ConfigurationType.name LIKE' => '%'.$_POST['q'].'%',
),
);
$configType = $this->import('ConfigurationType', 'Model');
$types = $configType->find('list', $options);
$this->set('output', json_encode ($types));
$this->render('/elements/ajax');
}
}
// /app/views/elements/ajax.ctp
if (isset ($output)) {
echo $output;
}
?>
<script>
new Autocompleter.Ajax.Json(document.id(input), url, {
postVar: 'q',
postData: {},
ajaxOptions: {},
minLength: 1,
delay: 100,
filterSubset: true,
filterCase: false,
relative: false,
selectedMode: true,
zIndex: 100000000,
evalScripts: true,
selectFirst: true
});
</script>
Again, the result is being returned, but the javascript seems to not be picking
up on it. Not sure if it's how I'm rendering the result or what? Any thoughts
would be appreciated!
http://clientcide.com/docs/3rdParty/Autocompleter.Remote
http://www.clientcide.com/wiki/cnet-libraries/11-3rdparty/03-autocompleter.remote
Thanks in advance,
~Philip
http://lonestarlightandsound.com/
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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