ajax form post not working

hello

i am trying to insert new records in database but when i submit the form i am getting this error

Uncaught TypeError: Cannot read property ‘attributes’ of undefined

$.fn.yiiactiveform.validatejquery.yiiactiveform.js:272

$.fn.yiiactiveform.each.validate

so can anyone help me out to solve the error

here is my view code

<?php $form=$this->beginWidget('CActiveForm', array(


'id'=>'frmcontacts-form',


'enableAjaxValidation'=>true,


'enableClientValidation'=>true,


'clientOptions' => array('validateOnSubmit' => true),

)); ?>

<div class="row">


	<?php echo $form->labelEx($model,'FName'); ?>


	<?php echo $form->textField($model,'FName'); ?>


	<?php echo $form->error($model,'FName'); ?>


</div>





<div class="row">


	<?php echo $form->labelEx($model,'LName'); ?>


	<?php echo $form->textField($model,'LName'); ?>


	<?php echo $form->error($model,'LName'); ?>


</div>


<div class="row">


	<?php echo $form->labelEx($model,'Email'); ?>


	<?php echo $form->textField($model,'Email'); ?>


	<?php echo $form->error($model,'Email'); ?>


</div>


<div class="row">


	<?php echo $form->labelEx($model,'Phone'); ?>


	<?php echo $form->textField($model,'Phone'); ?>


	<?php echo $form->error($model,'Phone'); ?>


</div>


</div></div>


<div class="modClr"></div>


		<div class="modFot">


<div class="row buttons">


		<?php echo CHtml::ajaxButton($model->isNewRecord ? 'Create' : 'Update',


                       $model->isNewRecord ? CHtml::normalizeUrl(array('//member/directory/contacts/create')) : CHtml::normalizeUrl(array('//member/directory/contacts/update')),


                        array(


                            'type'=>'POST',


                            'success'=>'function(responseText,statusText) {


										   


										   $.fn.yiiGridView.update(\'contacts\');


                                           


                                        }',


                        ),


                        array('class'=>'modalCloseImg simplemodal-close saveBtn','id'=>'rec_save_button'));


					echo "  ".CHtml::button('Cancel',array('class'=>'modalCloseImg simplemodal-close cancelBtn','id'=>'rec_cancel_button'));


                ?>





</div>

<?php echo CHtml::hiddenField(‘AccountId’,$_GET[‘id’]); ?>

<?php echo $form->hiddenField($model,‘ContactId’); ?>

<?php $this->endWidget(); ?>

thankx in advance