The point of the original post (and my solution) was to send JSON formatted data back to the client, not just HTML to be inserted in a div. Maybe I should've created a less trivial example...
Anyhow my original solution wasn't good, the json.thtml view should be: /app/views/test/json.thtml <?php echo $text; ?> instead of sending X-JSON headers, there appears to be a limit as to how much data you can stuff in a header. So then you also need a JSON decoder on the javascript side (unless you trust your data, then just do an eval()) - just use the one at http://www.json.org/js.html. So if you just wanted the controller method called once instead of repeatedly, is that what AjaxHelper::remoteFunction() method does? Does it just generate a Prototype Ajax.Request? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
