Yii Framework Forum: Pasar Datos Chtml:: Ajaxbutton A Controller - Yii Framework Forum

Jump to content

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

Pasar Datos Chtml:: Ajaxbutton A Controller Rate Topic: -----

#1 User is offline   codecobalea 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 02-January 13

Posted 13 February 2013 - 08:28 AM

Saludo Supongo que sera algo obvio, pero no puedo obtener los datos de un textfield, insertarlos en variable CHtml::ajaxbutton y enviarlos al controller.

He probado con js:function , pero lo que me pasa es un literal.

Espero vuestra ayuda

Gracias
0

#2 User is offline   stilomio 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 45
  • Joined: 04-June 12

Posted 13 February 2013 - 03:52 PM

http://www.yiiplaygr...uest#ajaxButton


Aki te explican como
0

#3 User is offline   lagogz 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 421
  • Joined: 30-November 12
  • Location:Galiza

Posted 18 February 2013 - 02:26 AM

CHtml::ajaxButton('Edit','',array('ajax' => array(
                                        'type'=>'POST',
                                        'dataType'=>'json',                                                                                     
                                        'data'=>array('counter'=>$itemFormInfo['counter'],'server'=>$itemFormInfo['server'],'productType'=>$itemFormInfo['productType']),
                                        'url'=>CController::createUrl('sell/loadDialog'),       
                                        'success'=>'function(data){                                             
                                                 $("#uploadBox").dialog("open");
                                        }',                                     
                                        'async' => true,
                                        ),                                                              
                                ),array('id'=>'some-unique-id'))


Sacado de aquĆ­ Revisar
-----------------------------------------------------------------------------------------------
------------------------------- VISITEN FOCUCHASART --------------------------------
-----------------------------------------------------------------------------------------------
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