More Ajax/jason Trouble

Controller: obviously it is just dummy data.

	public function actionLoadTemplate(){

		 echo CJSON::encode(



	            'name'=>"Demo name",






I have included the three solutions i have tried under the three values returned


		 echo $form->dropDownList($model,'template_id',CHTML::listData(Sipconf::model()->findAllByAttributes(array('istemplate'=>'1')),'client_id','name'),


			 'ajax' => array(

			 	'type' => 'post',

			 	'datatype' => 'json',

			 	'url'=> CController::createUrl('sipconf/loadtemplate'),			 	













Firebug shows that the JSON data being returned is:

{"extension":"6000","name":"Demo name","number":"0123456789"}

the Sipconf_extension field updates with the entire JSON response, but the other two fields do not update correctly.

if i change val( to val(data) then i get the same JSON response in the text field.

hm not sure but try data[0].name…may be

That makes no difference :(

After three hours of troubleshooting … dataType should be spelled with a capital T