On Jul 30, 11:36 am, madmike210 <[EMAIL PROTECTED]> wrote:
> In a view, I would like to be able to click on a button and have the
> index displayed in a div.  I accomplish this by doing the following in
> a view:
>
> <div onclick="new Ajax.Updater('main_div', '/admin/groups/
> index');">GROUP VIEW</div>
> <span onclick="new Ajax.Updater(''main_div', '/admin/users/
> index');">USER VIEW</div>
>
> <? echo $ajax->div('main_div'); ?>
> <? echo $ajax->divEnd('main_div'); ?>
>
> However, the index.thtml is displayed in the div with the information
> generated by default.thtml.  In other words, index.thml is displayed
> the same as it would if I went directly to the address.  So, it looks
> like a page is displayed in my div.  How do I prevent this?  How would
> I only display the code that is in the specified index.thtml without
> the default.thtml it is wrapped in?

In your controller use:
$this->layout = "ajax";


--
/David


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to