Well, that's a lot more work than you need to do, but okay.  What about
this:

/app/controllers/test_controller.php
<?php

class TestController extends AppController  {
        var $uses = array();
        var $helpers = array('Html', 'Javascript', 'Ajax');

        function index() { }

        function get_text() {
                $this->set('text', 'Hello World!');
        }
}

?>

/app/views/test/get_text.thtml
<?php e($text); ?>

/app/views/test/index.thtml
<p>The text below is retrieved asynchronously from the server, and
updated every 10 seconds:</p>
<div id="sometext"></div>
<?=$ajax->remoteTimer(array('url' => '/test/get_text', 'update' =>
'sometext')); ?>

(The layout stays the same as above).


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