I noticed a problem in this situation:
1- We make 3 ajax tabs using CJuiTabs widget as follow:
$this->widget('application.extensions.CJuiTabsMast', array(
'id'=>'tabs-wizard',
'tabs'=>array(
'tab1'=>array('id'=>'tab-article','ajax'=>$this->createUrl('/article/wizard')),
'tab2'=>array('id'=>'tab-attachment','ajax'=>$this->createUrl('/attachment/wizard') ),
'tab3'=>array('id'=>'tab-articleauthor','ajax'=>$this->createUrl('/articleauthor/wizard') ),
),
// additional javascript options for the tabs plugin
'options'=>array(
'collapsible'=>true,
),
));
2- In tab3 we have a forms with ajaxSubmitButton.
echo CHtml::ajaxSubmitButton($model->isNewRecord ? 'create',$this->createUrl('/articleAuthor/wizard' ), array (
'update'=>'#articleAuthor-ajax-result',
));
Problem is as follow:
I click on tab3 and submit the form ( it submits once, firebug show 1 ajax post).
I click on other tabs and again click back on tab3 and fill the form and submit ( firebug show 2 ajax posts!!)
I click on other tabs and click back again on tab3 and fill the form ( firebug shows 4 ajax posts).
I’m investigating to know the reason.