In yii form submit i would like to add a loading indicator till the form submission. Now the form contain file field and can't use ajaxsubmit button. How can i add loading indicator in normal form submit button?
Thanks

form code

```
 <div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'master-form',
    'enableAjaxValidation'=>false,
         'htmlOptions' => array('enctype' => 'multipart/form-data'),
)); ?>

    <p class="note">Fields with <span class="required">*</span> are required.</p>
 <div id="AjaxLoader" style="display: none"><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/spinner.gif"></img></div>
 <div id="ajaxs"></div>
    <?php //echo $form->errorSummary($model); ?>

        <div class="row">
        <?php echo $form->labelEx($model,'type'); ?>
            <div id="select">
                    <?php //echo $form->textField($model,'type');
                      echo $form->dropDownList($model,'type',array('1'=>'one','2'=>'two','3'=>'three','4'=>'four','5'=>'five'),array('empty'=>'Select'));
                ?></div>
        <?php echo $form->error($model,'type'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'name'); ?>
        <?php echo $form->fileField($model,'name',array('size'=>60,'maxlength'=>100)); ?>
        <?php echo $form->error($model,'name'); ?>
    </div>

    <div class="btn">
        <?php echo CHtml::submitButton('Submit',array(
'onSubmit'=>'js:function(){$("#ajaxs").addClass("loading");}',
)); ?>
    </div>

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

</div><!-- form -->

```