I have the following situation:
A view where I call an AJAX helper with following options:
<?php $options = array(
'url' => array('controller' => 'users', 'action'=>'login'),
'before' => 'startLoadingLogin()',
'complete' => 'endLoadingLogin()',
'failure' => 'alert(\'Error\')'
);
?>
Once the AJAX call is completet the JS function endLoadingLogin() is
called. In this function I want to access a return value that I wrote
in the controller like this:
echo "1";
$this->render(null,'ajax');
How can I access the return value of this AJAX call in my
endLoadingLogin() function?
I have tried accessing things like:
var response = t.responseXML.documentElement;
var response = oXmlHttp.responseText;
in endLoadingLogin() but they don't seem to work and I don't see how
they should work anyway, because there is no connection between the
response variable and the AJAX call...
Any ideas are highly appreciated!
cheers,
tobi_one
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment