Radiobuttons On Action Should Update The Text Field

I’m a newbie. I want to create two buttons in _form.php. The two buttons are “‘0’=>approve” and “‘1’=>Reject”. Now, I have a text field for date. I need to update it with current date when approve is clicked and null when reject is clicked. How can I do this.

Try this,

//ln _form.php

echo CHtml::radioButtonList(

                'button_name',


                '',


                array(


                    '0'=>'Approve',


                    '1'=>'Reject',


		


                )


            );

<script>

$(’#button_name_1’).change(function(){

		&#036;('#textarea_id').val('');


		


		});

$(’#button_name_0’).change(function(){

		var today = new Date();


		&#036;('#textarea_id').val(today );


		


		});

</script>

No Date gets updated for reject also and not showing null.

plz attach your _form.php