hello

My autocomplete  code is not work

My controller code.


                function autocomplete()
                {
                        $this->layout = "ajax";
                        $this->set('genres', $this->Genre->findAll("url LIKE
                        '{$this->data['Genre']['url']}%'",array('url'), 'url 
ASC',10));

                }



View Code

<style type="text/css">
auto_complete_new
{
  font-family : Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif;
  font-size : 12px;
  color:black;
  text-align:left;

}

.auto_complete_new ul
{
  width: 100%;
  margin: 0;
  padding: 0;overflow-x:hidden;
  list-style-type: none;

}

.auto_complete_new ul li
{
  width: 170;
  margin: 0;
  padding: 3px;
  border-bottom: 1px solid #eee;
  list-style-type: none;
  /*background-color: #00CCFF */
  background-color: #FFFFC6

}

.auto_complete_new li.selected
{
    color:#FFF;background-color: #A2CD5A;

}
</style>

<ul>
<?php echo
$ajax->autoComplete('Genre/url','/users/autocomplete',array
('frequency'=>'0.01',
'class'=>'auto_complete_new'));  ?>


<?php
foreach($genres as $genre): ?>
<li><?php echo $genre['Genre']['url']; ?></li>
<?php endforeach; ?>
</ul>


Pls help me.

Thanks
Ranjana

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to