Yii Framework Forum: Hide Div In Second Submit - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Hide Div In Second Submit ajax submit button Rate Topic: -----

#1 User is offline   arsitek 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 133
  • Joined: 10-October 08

Posted 09 November 2013 - 12:59 AM

I can populate hidden divs only after the first form submit. After the first submit the #out_put always opened.

My original codes

echo CHtml::ajaxSubmitButton(' SUBMIT ',
                        array('site/actionName'),
                        array(
                                'beforeSend' => 'function(){
                        $("#out_put").addClass("ajaxloading");}',
                        'complete' => 'function(){
                        $("#out_put").removeClass("ajaxloading");}',
                                'update'=>'#out_put',
                        ),
                        array('class'=>'btn btn-success span12')        
); 


I tried smthng like this but it's not working

echo CHtml::ajaxSubmitButton(' SUBMIT ',
                        array('site/actionName'),
                        array(
                                'beforeSend' => 'function(){
                                $("#out_put").hide();
                        $("#out_put").addClass("ajaxloading");}',
                        'complete' => 'function(){
                                $("#out_put").show();
                                e.preventDefault();
                        $("#out_put").removeClass("ajaxloading");}',
                                'update'=>'#out_put',
                        ),
                        array('class'=>'btn btn-success span12')        
); 


Please help..
Thank you
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users