thanks for the reply nate,
the view (index.thtml for my Posts Controller):
--------------------------------------------------------------------------------------------------------------------------
<div id="content">
<div id="intro">
<h2>Bienvenidos</h2>
<p>El Sistema de Cooperación entre las Fuerzas
Aéreas
Americanas (SICOFAA) es una organización apolítica y de
carácter voluntario. Su propósito es promover y
fortalecer los lazos de amistad y el apoyo mutuo de los
participantes.</p>
</div>
</div>
<?= $ajax->div('calendarDiv');?>
<?=
$javascript->codeblock('updateOnce(\'calendarDiv\',\'events/miniMonth\')'
. "\n"); ?>
<?= $ajax->divEnd('calendarDiv'); ?>
--------------------------------------------------------------------------------------------------------------------------
UpdateOnce:
--------------------------------------------------------------------------------------------------------------------------
function updateOnce(div,url) {
ajax = new Ajax.Updater(div,url,{method:'get'});
}
--------------------------------------------------------------------------------------------------------------------------
UpdateOnce is my "hack" for getting my div to populate.
Here's minMonth from the Events Controller:
--------------------------------------------------------------------------------------------------------------------------
function miniMonth($month=null,$year=null){
$this->layout = 'ajax';
if(!isset($month) || intval($month) <= 0 || intval($month) >
12){
$month = intval(date('m'));
}
else{
$month = intval($month);
}
if(!isset($year) || intval($year) <= 0){
$year = intval(date('Y'));
}
else{
$year = intval($year);
}
if($month == 12){
$this->set('nextMonth',1);
}
else{
$this->set('nextMonth',$month+1);
}
if($month == 1){
$this->set('prevMonth',12);
}
else{
$this->set('prevMonth',$month-1);
}
$this->set('year',$year);
$this->set('month',$month);
$this->set('nextYear', $year+1);
$this->set('prevYear', $year-1);
$this->set('today', intval(date('j')));
$this->set('timestamp', mktime(0,0,0,$month,1,$year));
$this->set('daysInMonth',cal_days_in_month(CAL_GREGORIAN,$month,$year));
$this->set('events',$this->Event->getEventsByMonthYear($month,$year));
}
--------------------------------------------------------------------------------------------------------------------------
Here's a link to what I'm doing:
http://sicofaa.org/developer/posts
Thanks for the help.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---