Clear text field on successful Jquery Ajax call

Hi

I have this issue. I have tried many things but did not work…

On click of a button, after successful Ajax call, I want text fields to be clear.

Below is the code

<?php echo CHtml::beginForm()?>

<?php echo CHtml::activeLabel($model2, "Create Player")?>

<?php echo CHtml::activeLabel($model2, "email")?>

<?php echo CHtml::activeTextField($model2, “email”,array(‘id’=>‘foo’))?>

<?php echo CHtml::activeLabel($model2, "fname")?>

<?php echo CHtml::activeTextField($model2, “fname”,array(‘id’=>‘foo1’))?>

<?php echo CHtml::activeLabel($model2, "lname")?>

<?php echo CHtml::activeTextField($model2, “lname”,array(‘id’=>‘foo2’))?>

<?php echo CHtml::button(’+’,array(‘class’ => ‘tasks-add’))?>

<ul class="tasks">

</ul>

 &lt;div class=&quot;row buttons&quot;&gt;





  &lt;?php Yii::app()-&gt;clientScript-&gt;registerCoreScript


  (&quot;jquery&quot;)?&gt;

[b] <script>

  &#036;(&quot;.tasks-add&quot;).click(function(){


  &#036;.ajax({


  success: function(html){


  &#036;(&quot;.tasks&quot;).prepend(html);


  },


  type: 'post',


  url: '&lt;?php echo &#036;this-&gt;createUrl('field')?&gt;',


  data: {


  index:&#036;(&quot;#foo&quot;).val(),index1: &#036;(&quot;.tasks li&quot;).size()


  },


  cache: false,


  dataType: 'html'


  })

});

</script>[/b]

</div>

<?php echo CHtml::endForm()?>

place


$('input[type=text]').attr('value', '')

into your success call or something like this

thats what i am looking for…how to place it in the success call…