1

I am running an ajax submit in cakephp. It appears to be running, but the end result for the population of the assigned div is the page itself as opposed to the results set. And it also says the controller is missing which obviously is not true.

Model: Plan

Action: search()

search form element (being pulled into the search.ctp):

...

echo $ajax->form(array('type' => 'post',
    'options' => array(
        'update'  => 'plansQueryResults',
            'url'     => array('controller' => 'plan', 'action' => 'search'),
        'loading' => "Element.show('plsLoaderID')",
        'loaded'  => "Element.hide('plsLoaderID')"
    )
));

...

echo $form->end(); 

This div is pulling in the default layout, but

<div id="plansQueryResults"></div>

Standard error (wrapped around default layout) displaying within the div:

Missing Controller

Error: PlanController could not be found.

Error: Create the class PlanController below in file:     dental/1/app/controllers/plan_controller.php

<?php
class PlanController extends AppController {

var $name = 'Plan';
}
?>
1
  • I fixed the missing controller by changing 'plan',.. to 'plans', but still trying to resolve getting the actual results in my div. Commented May 12, 2011 at 22:35

1 Answer 1

1

What is the code you have on the search action?

What is the returned data from the action? Check with Firebug.

By the way... when following the standards to create a DB, it is better and handy use cake bake: Code Generation with Bake

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.