0
我設法在cakephp中獲得了ajax函數,該函數在單擊下拉列表來填充另一個下拉列表時調用它。我無法獲得的一個領域是傳遞第一個下拉列表的id值,以便我可以進行查找。cakephp在ajax中傳遞下拉值
我希望通過公司編號,以便我可以得到相關的僱員。
謝謝。
檢視:
<?php
$this->Js->get('#MonthlyReturnCompanyId')->event('change',
$this->Js->request(
array(
'controller'=>'MonthlyReturns',
'action'=>'getemployees',
),
array(
'update'=>'#test',
'async' => true,
'method' => 'post',
'dataExpression'=>true,
'data'=> $this->Js->serializeForm(array(
'isForm' => false,
'inline' => true
))
)
)
);
?>
echo $this->Form->input('company_id' , array('empty' => true));