I have a simple template (login.ctp) which includes:
<--------------------
<div id="content">
replace this
</div>
<?php
$options = array('url' => 'update_content', 'update' => 'content');
echo $ajax->link('Click here', null, $options);
?>
-------------------->
my controller (users_controller.php) includes the following function:
<--------------------
function update_content() {
$content = 'sample content';
}
-------------------->
I have another simple template (update_content.ctp):
<--------------------
<?php
echo "content: ";
echo $content;
?>
-------------------->
When I click on the "Click here" link I expect the "content" div to be
changed from "replace this" to "content: sample content". However, it
is replaced with nothing (i.e. "replace this" disappears, but is not
replaced"). Ajax is obviously working (or nothing would happen),
however the "update_content.ctp" is not being returned. What am I
doing wrong?
Thanks for any assistance in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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?hl=en
-~----------~----~----~----~------~----~------~--~---