how to use ajax

hi im new to yii i need to know how to use ajax with yii . i have an textbox username i want to check wheater username is available or not on change ie without submitting so i wanted to call an ajax function on onchange of a textbox but i dont know wht to do in tht javascript function should we do same thing tht we do in normal php coding ie call an url and in and check an return state if its ready state, please help me.

NOTE: moved to proper forum - originaly you posted on "Yii-Powered applications" but as this is a question it does not belong there

As for the question… you need to study Yii a bit more…

Begin with the Definitive guide to Yii - http://www.yiiframework.com/doc/guide/