How to chance field value with Ajax

Hi,

I’m new with Yii and haven’t really understood how to use Ajax. Sorry if my question is stupid or it has been solved in some other topic (wasn’t able to find solution, although there are topics about Ajax).

So what I’m trying to do: Let’s say I have three fields on my form, fieldA, fieldB and fieldC. When a user types “1” to fieldA and “2” to fieldB the value of fieldC should be automatically updated to “3”. Basically this is exactly what I need (except the server side script of course), but I don’t know how to do this with Yii.

Can someone help me with the problem? Thanks.

Have a look here:

(It’s my topic where you can download a PDF Yii manual that includes 1 Ajax example. It’s exactly what you need. I hope it will help.)

http://www.yiiframework.com/forum/index.php?/topic/6129-total-fresher-in-php-frameworks-and-yii-i-dont-understand-tutorials/