Sunday, September 27, 2009

return data from ajax controller without using an element

Hi All,

Very simple question, I have a controller called by an ajax call that
will return a single number for its response. I couldn't find a way to
return just that value without going through the process of creating
an element for it and doing something like this:

$this->set('value', $new_order);
$this->render('/elements/sort_edit_form', 'ajax');

The contents of the sort_edit_form.ctp are mind-numbingly simple:

<?= $value; ?>

Anyway to bypass the use of an element and simply return the value
straight back? Or is this how cakephp insists on doing things?

Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
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: