How To Onchange Event Based On Upate Url Call

iam using dropdown values at the time onchange even based on update the database values now i got a problem is how call update url in onchange function pls help any one

Can you explain again what you’re trying to do? Are you trying to submit the selected value via ajax? http://www.yiiframework.com/forum/index.php/topic/5278-dropdownlist-onchange-submit-question/page__view__findpost__p__147684

Matt

no sir iam using one dropdown values at the time onchange how to update database how to pass the values in onchange function in update url





<div class="row">

<?php echo $form->labelEx($model,'fielName'); ?>

<?php echo $form->dropDownList($model,'fielName', CHtml::listData(ModelName::model()->findAll(), 'value','displayName'),

	array(

		'prompt' => '--Please Select --',

		'value' => '0',

		'ajax'  => array(

			'type'  => 'POST',

			'url' => CController::createUrl('controller/action'),

			'data' => array(

				'paramName1' => 'js:this.value',

				'paramName2' => $model->id,

				...

			)

		)       

	)); 

?>

</div>



my dropdown option is i gave like this way how to ajax based update the database value how to control part modify the action

<?php echo $form->dropDownList($model, ‘measurement_units’, array( ‘Matric’=>‘Matric’,‘U S Customary’=>‘U S Customary’,),

                              array('empty'=&gt;'Select','onchange'=&gt;'this.form.submit()' ,'onchange'=&gt;'change()' ) );  ?&gt;

My code example above will send an AJAX request to the controller/action. You can update the database in the controller/action.