Yii Framework Forum: Ajax Checkbox Toggle - Yii Framework Forum

Jump to content

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

Ajax Checkbox Toggle Rate Topic: -----

#1 User is offline   shafi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 03-August 12
  • Location:cochin keral india

Posted 09 May 2013 - 06:25 AM

echo CHtml::checkbox('my_checkbox', false, array(
                              
                                                            'value'=>'on',
                                'ajax' => array(
                                'type'=>'POST',
                                'url'=>'index.php?r=realestate/default/checkboxUpdate',
                                'data'=>"shafi"
                            //    {
                                //   var est_valide=$('#UserEst_valide').is(':checked')?0:1;
                                 //  return 'User[est_valide]='+est_valide;
                                //}",
 //array(
  //'submit'=>'index.php?r=realestate/default/checkboxUpdate',
  //'params'=> array('my_checkbox'=>'1')
//)
))); ?>
// in the controller

public function actionCheckboxUpdate() {
 
     echo "wow success";
}





ajax checkbox toggle works nicely...
0

#2 User is offline   Anu Anna John 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 26-May 13

Posted 26 May 2013 - 05:16 AM

View Postshafi, on 09 May 2013 - 06:25 AM, said:

echo CHtml::checkbox('my_checkbox', false, array(
                              
                                                            'value'=>'on',
                                'ajax' => array(
                                'type'=>'POST',
                                'url'=>'index.php?r=realestate/default/checkboxUpdate',
                                'data'=>"shafi"
                            //    {
                                //   var est_valide=$('#UserEst_valide').is(':checked')?0:1;
                                 //  return 'User[est_valide]='+est_valide;
                                //}",
 //array(
  //'submit'=>'index.php?r=realestate/default/checkboxUpdate',
  //'params'=> array('my_checkbox'=>'1')
//)
))); ?>
// in the controller

public function actionCheckboxUpdate() {
 
     echo "wow success";
}





ajax checkbox toggle works nicely...

super...worked nicely
0

#3 User is offline   CTala 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 109
  • Joined: 17-August 11
  • Location:Chile

Posted 26 July 2013 - 02:17 PM

I tried this without any luck. Is not togleing. Anyone else with this trouble ?
--
MSc. Cristian Tala Sánchez
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