So I read the following article and implemented everything detailed
within. I followed the instructions exactly in this article and it's
not working.
The following is in my default layout:
<head>
<title><?php echo $title_for_layout;?></title>
<?php
echo $html->charsetTag('UTF-8');
echo $javascript->link('prototype');
echo $javascript->link('scriptaculous.js');
echo $javascript->link('controls');
?>
</head>
Here is what my controller looks like:
var $helpers = array('Html', 'Form' , 'Ajax', 'Javascript' );
var $components = array( 'Pager', 'Autocomplete' );
(I didn't make any other change or add any other code to my controller)
This is what my view looks like:
<div class="required">
<?php echo $form->labelTag('User/theme', 'Autocomplete Theme');?>
<?php echo $ajax->autoComplete('User/theme', '', array( 'autocomplete'
=> 'on' ));?>
<?php echo $html->tagErrorMsg('User/theme', 'Please enter the
Theme.');?>
</div>
And here is what gets rendered in my browser (excerpt):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Users</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="/narthex/js/prototype.js"></script>
<script type="text/javascript"
src="/narthex/js/scriptaculous.js"></script>
<script type="text/javascript" src="/narthex/js/controls.js"></script>
</head>
<body>
<form action="/narthex/users/edit/joebobbriggs" method="post">
<div class="required">
<label for="UserTheme">Autocomplete Theme</label>
<input name="data[User][theme]" autocomplete="off"
id="UserTheme" value="CH" type="text" />
<div id="UserTheme_autoComplete" class="auto_complete"></div>
<script type="text/javascript">
new Ajax.Autocompleter('UserTheme',
'UserTheme_autoComplete', '/narthex/users/edit/joebobbriggs', {});
</script>
</div>
<input type="submit" value="Save" /></div>
</form>
</body>
</html>
One thing that I did notice is that 'autocomplete' is set to 'off' in
the input tag. Is it supposed to be like that?
So what else do I need to do? I've got to be missing something here...
thnx,
Christohp
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---