Hi guys,
I have used this tutorial http://www.yiiframework.com/wiki/24 to create a dependable drop-down where upon selection of an item type a second drop-down is populated with a sub-type corresponding to the item. My problem is that I want to enforce the ajax request to be executed upon page load and I honestly don’t know how to do that. Here’s my code:
view:
echo $form->dropDownList($model, 'itemType', $model->getItemTypes(),
array('ajax' => array(
'type'=>'POST',
'url'=>CController::createUrl('items/dynamicItemSubtypes'),
'update'=>'#FilterForm_itemSubtype',
)));
echo $form->dropDownList($model, 'itemSubtype', array());