here is something to chew on tho, and it should work fine within Yii
Code:
/* watch for changes on <div id="ServiceRequest_selection"> */
$("#ServiceRequest_selection").change(function() {
/* make an ajax call to get our calculation to ajax/getCalculation.php */
$.ajax( {
type: "POST",
url: 'ajax/getCalculation.php',
key: "id",
success: function(response) {
/* if we got a response change the content in div id="resultField"></div> to the response */
$('#resultField').html(response);
}
});
return false;
} );