how can i update multiple textfields on click text link?
are there any examples?
how can i update multiple textfields on click text link?
are there any examples?
if you can update one ,you can update more than one
$.post/get(url,{"k":v} function(response){
// if your controller action response a json string :
var res = $.parseJSON(response);
$("#text1").val(res.someKey ); $("#textId2").val(res.anotherKey);
});
in your controller you can use this to output json string:
// do some logic handling here
.....
echo CJSON::encode(array('someKey'=>$xx,'anotherKey'=>$yy ......)); die();
you can use CHtml::ajaxLink to rewrite the raw jquery ajax usage above . CHtml::ajaxLink