I can't get the AJAX Helper functions to update a <div> in either
Firefox or IE (Forefox crashes!). For some reason it only works on
Safari (Mac). Here's the relevant code:


****views/layouts/default.thtml****
<?php echo $this->renderElement('navbar'); ?> ...
<div id="sidenav">&nbsp;</div>


****views/elements/navbar.thml****
<?php echo $ajax->link('Builders', '/admins/updatenav/builder',
array('update'=>'sidenav' )); ?>


****controllers/admins.php****
function updatenav($navbar) {
        $this->layout = 'ajax';
        $this->set('navbar', $navbar);
}


****views/layouts/ajax.thtml****
<?php echo $content_for_layout; ?>


****views/admins/updatenav.thtml****
<?php echo $ajax->div('sidenav'); ?>
        <?php echo $this->renderElement($navbar); ?>
<?php echo $ajax->divEnd('sidenav'); ?>


****views/elements/builder.thtml****
<ul>
  <li><?php echo $html->link('Builders', "/builders/show" ); ?>
      <ul class="subnav">
        <li><?php echo $html->link('New Builder', "/builders/add" );
?></li>
        <li><?php echo $html->link('Edit/Delete Builder',
"/builders/show" ); ?></li>
        <li><?php echo $html->link('New Project', "/projects/add" );
?></li>
        <li><?php echo $html->link('Edit/Delete Project',
"/projects/show" ); ?></li>
     </ul>
  </li>
</ul>


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