No, you're not getting it.  Here's how your code should look:

(1) You should render your 'view' page in the default layout
(default.thtml), like so:
function view($id)  {
    if($id=="test"){
        $this->render('test');
    }
}

(2) All of this:
<?= $javascript->link('dojo/dojo.js') ?>
<?= $javascript->link('prototype')?>
<?= $javascript->link('scriptaculous.js?load=effects') ?>
should go in your default layout (default.thtml).

I'm guessing you may also need to do your dojo.require()'s there, but I
can't say for sure, as I don't know enough about how dojo loads
external libraries.

Also, using charsetTag is useless when returning data for an Ajax call,
as it won't get evaluated by the browser, and RequestHandler
automatically sets the character encoding to UTF-8 in the response
headers.  Your Ajax layout should also not include a <head> tag.

If you're loading the same page you're viewing again via an Ajax link,
it's going to render it again and put the contents in the div you told
it to update; this is an intended behavior.


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