I'm following the example at:
http://www.yiiframework.com/wiki/49/
In my form I have
vehicle/_form.php
<div id="data">
<?php echo 'before ajax'; // $this->renderPartial('_ajaxContent', array('myValue'=>$myValue)); ?>
</div>
<?php echo CHtml::ajaxButton ("Update data",
CController::createUrl('vehicle/UpdateAjax'),
array('update' => '#data'));
?>
The above works and updates the div data as expected. But if I use
array('update' => '#Vehicle_chassis_number'));
Nothing happens... Changing update to replace removes the input box and displays the text.
array('replace' => '#Vehicle_chassis_number'));
I just need to update the input value, is there an easier what to do this?
Actually, what I need to do is update several fields with values based on a car registration lookup using SOAP.
The other files are the same as the example
views/vehicle/_ajaxContent.php
<?php echo $mymodel ?>
controllers/VehicleController.php
public function actionUpdateAjax()
{
$data = array();
$data["myValue"] = "Content updated in AJAX";
$this->renderPartial('_ajaxContent', $data, false, true);
}

Help














