after select C_seat <div> is auto show text, but in the controller cannot get value from dropdownlist
index.php
<div class="control-group">
<label class="control-label" for="Customers_C_time">
Time
<span class="required"> * </span>
</label>
<div class="controls">
<?php
echo $form->dropDownList($model, 'C_time', $this->HH(), array('empty' => 'select',
'ajax' => array(
'type' => 'POST',
'url' => CController::createUrl('Customers/MM'),
'update' => '#Customers_drpMinute',
'data' => array('hour' => 'js:this.value'),
), 'class' => 'input-small',
));
echo " : ";
echo $form->dropDownList($model, 'drpMinute', array('empty' => 'select'), array('class' => 'input-small',));
echo $form->error($model, 'C_time');
echo $form->error($model, 'drpMinute');
?>
<div id="error"></div>
</div>
</div>
<?php
echo $form->dropDownListRow($model, 'C_seats', $this->getSeat(), array('empty' => 'select',
'ajax' => array(
'type' => 'POST',
'url' => CController::createUrl('Customers/isAvailable'),
'update' => '#status',
'data' => array('seats' => 'js:this.value'),
), 'class' => 'input-small',
));
?>
Controller.php
public $hr;
public $mm;
public $se;
public function actionisAvailable() {
if (isset($_POST['seats']) && $_POST['seats'] != '') {
$this->se = $_POST['seats'];
$this->hr = $_POST['C_time'];
$this->mm = $_POST['drpMinute'];
}
echo CHtml::encode(print_r($this->hr, true));
}