Difference between #7 and #8 of
An Easy Solution for Dependent dropDownList Using AJAX

Revision #8 has been created by Kostas Apazidis (KonApaz) on Apr 15, 2014, 8:02:20 AM with the memo:

alternative handle of received data
« previous (#7)

Changes

Title unchanged

An Easy Solution for Dependent dropDownList Using AJAX

Category unchanged

Tips

Yii version unchanged

Tags unchanged

AJAX, drop down list

Content changed

[...]
array(
'prompt'=>'Select Region',
'ajax' => array(
'type'=>'POST',
'url'=>Yii::app()->createUrl('YourController/loadcities'), //or $this->createUrl('loadcities') if '$this' extends CController
'update'=>'#city_name',
//or 'success' => 'function(data){...handle the data in the way you want...}',
'data'=>array('region_id'=>'js:this.value'),
)));
[...]
7 1
24 followers
Viewed: 87 097 times
Version: 1.1
Category: Tips
Written by: mrs
Last updated by: Kostas Apazidis (KonApaz)
Created on: Dec 9, 2012
Last updated: 4 years ago
Update Article

Revisions

View all history