Ajax radiobuttonlist issue

Hi guys, I have a little problem that has been driving me crazy. I just can’t seem to figure it out, but I think that there might be an obvious solution.

On my form, I have a radio button list that sends an ajax request on click event, and updates the image which is on the same page. In detail, the radio buttons are there to change the way a string of text appears on the image (such as uppercase, lowercase, etc). Here is the code from the view:

<?php echo $form->radioButtonList($model, 'title_text_transformation', 

array(0=>'None') + Layout::lookupTextTransformations(), 

array('labelOptions'=>array('class'=>'inline'), 'separator'=>'<br>', 

'onclick'=>CHtml::ajax(array('type'=>'GET', 'url'=>array("layout/add"), 

'update'=>'#layoutImage')))); ?>

here’s the problem I’m facing: when the event is triggered, my variable (Layout[‘title_text_transformation’]) contains the previous radio button selection (before it was clicked). When i select another radio button, the variable now contains the selection from before (the one i was expecting after the first click), etc. Bottom line, upon any new radio button selection, my variable $_GET[‘Layout’][‘title_text_transformation’] always has the previously selected choice.

The strange thing is that this works on Yii’s own design (css), but when I try another css it doesn’t. Maybe it’s the way that the radio buttons are rendered using that css, but since I’m a css noob, I can’t seem to figure it out.

Any suggestions would be appreciated :)

I tried with ‘onchange’ instead of ‘onclick’ and it worked!

I still don’t really understand what the problem was, since it was working with ‘onclick’ with Yii’s css