I have auto-complete controller:

function index()
{
    $criteria = "term LIKE '%{$this->data['Art']['term']}%'";
    $options = array(
                "show"          => 100,
                "order"         => "account",
                "sortBy"        => "account",
                "ajaxDivUpdate" => "auto_complete_results",
                "style"         => "ajax");

    list( $order,$limit,$page ) = $this->Pagination->init( $criteria,
NULL, $options );
    $data = $this->Art->findAll($criteria,
                                        NULL,
                                        $order,
                                        $limit,
                                        $page);
    $this->set( 'art', $data );

    if($this->data['Art']['term'])
        $this->layout = "ajax";
}

I can get my page to return one page of results, but when I click on
the paginated navigation, nothing happens.

<div id="auto_complete_results">

<?if(isset($this->data['Art']['term']))
    {
        $pagination->setPaging($paging);?>

        <table>
            <?
            $count = count($art);
            if( $count < 1 )
            {
                echo "No results.";
            }
            else
            {
                $headers = array(...);

                foreach($headers as $header)
                {
                   echo "<td id=\"autocomplete\">$header</td>";
                }

                foreach($art as $a)
                {?>
                    <tr><td id="index">
                    <?=implode("</td><td
id=\"autocomplete\">",$a['Art']);?>
                    </td></tr>
                <?}?>
            <?}?>
        </table>
        </div>
        <?=$this->renderElement('pagination',$paging);?>
    <?}else{?>
        </div>
        <div id="search_table">
            <h3>Search info:</h3>
            <form action="/web/art" method="POST">
               <?=$ajax->autoComplete('Art/term','/art/index')?>
            </form>
        </div>
    <?}?>
<div id="clear"></div>


Can anyone suggest where I have gone wrong?

Thanks,
Noah


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

Reply via email to