I have been trying to make a remoteCall using the
AjaxHelper::remoteFunction(...).  All that the following code does is
print the javascript to the browser :

new Ajax.Updater('menu','/organizations_list/getSchoolOrganizations',
{asynchronous:true, evalScripts:true, requestHeaders:['X-Update',
'menu']})

It isn't calling the getSchoolOrganizations function at all as far as I
can tell.  Does anyone know what I am doing wrong.  I have pasted some
snippets below (Sorry but I couldn't find that code bin thing)

Thank you for any help.

view 1 code:
<div class="menu">

</div>

<div class="menu">
<?php
echo($ajax->remoteFunction(array('update'=>'menu',



'url'=>'/organizations_list/getSchoolOrganizations')));
?>
</div>

<div class="menu">

</div>

view 2 code:
AJAX CALL SUCCEEDED

controller 1 code:
<?php

class OrganizationsController extends AppController
{
        var $name = 'Organizations';
        var $helpers = array('Ajax');
.
.
.
function register()
{}
.
.
.

controller 2 code:
class OrganizationsListController extends AppController
{
        var $name = 'OrganizationsList';
        var $helpers = array('Ajax');
.
.
.

        function getSchoolOrganizations($schoolListId=null)
        {
                //$arrOrganizations =
$this->OrganizationList->findAllBySchoolId($schoolListId);
                $arrOrganizations = array('practice'=>'perfect',
'failure'=>'success');
                $this->set('organizations', $arrOrganizations);
                $this->render('get_school_organizations', 'ajax');
        }
.
.
.

ajax layout :
<?php echo $content_for_layout; ?>


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

Reply via email to