There’s a way to update multiple id at once with Ajax ?
echo CHtml::dropDownList('country_id','', array(1=>'USA',2=>'France',3=>'Japan'),
'ajax' => array(
'type'=>'POST', //request type
'url'=>CController::createUrl('currentController/dynamiccities'), //url to call.
[u]'update'=>'#city_id,#state_id', //selector to update[/u]
Do you have an example plz ?
I just want to update 2 differents div at the same time, and the datas will be handled by the controller.
So if the div id is city, the dropdownlist will be filled with appropriate cities, and if the div id is states, the dropdownlist will be filled with appropriate states.
See this thread. The function can be placed inline.
I tried your example and i have the following error : updateFields is not defined
I don’t know whether that example is fully functional. (In the example the function block was not closed, perhaps you missed that.)
You can use inline code, something like this
Success and Update can not work at the same Time.If we Use a Success param then we need to right a bit of code there.But Updating a Din better option.
So my question is that. i’ll prefer to update a multiple div at a time.Is there any mean solution for this issue ??.