Thanks to @Lothor I have made some progress…
I have my TbNavBar:
<?php $this->widget('bootstrap.widgets.TbNavbar', array(
'type'=>'',
'brand'=>'',
'brandUrl'=>'#',
'collapse'=>true,
'fixed' => false,
'items'=>array(
array(
'class'=>'bootstrap.widgets.TbMenu',
'items'=>array(
array('label'=>'select outlet',
'url'=>'#',
'active'=>false,
'items'=>$arr,
),
array('label'=>'select year', 'url'=>'#'),
array('label'=>'select month', 'url'=>'#'),
),
),
),
));
?>
where the items under the menu item "select outlet" are defined as:
$arr = array();
foreach($outlets as $value) {
array_push($arr, array(
'label'=>$value->description,
'url'=>'#',
'linkOptions'=>array(
'ajax' => array(
'type'=>'POST',
'url'=>CController::createUrl('salesStatement/UpdateAjax'),
'data'=>array('program_id'=>$value->program_id),
'success'=>'function(response) {
oData = response.split("|");
$("#outlet").html(oData[0]);
$("#stmnt_total").html(oData[1]+","+oData[2]+","+oData[3]+","+oData[4]+","+oData[5]);
$.fn.yiiGridView.update("sales-statement-grid", {data: $(this).serialize()});
}',
)
),
));
}
This all works fine, except for:
-
when a link is clicked in the dropdown, the dropdown stays and does not close…
-
labels with characters such as apostrophes get displayed as & # 0 3 9 ;
with a little bit of help from friends…