Hi all,
I am trying to call an ajax function when the button is clicked, everything is ok except that the parameter is no passed.
This is the button definition (is visible $data->id == 5)
'buttons' => array
(
'aceptarAjax' => array
(
'imageUrl' => Yii::app()->request->baseUrl . '/images/iconos/system-tick-alt.png',
'ajax' => true,
'click'=>'function(){ajaxUrl("'.
Yii::app()->createUrl("cmp/invitacion",array("ec"=>$data->id,"td"=>1))
.'"); }',
'visible'=>'$data->id==5',
'options' => array('title' => 'Aceptar Invitación', 'alt' => 'Aceptar Invitación'),
),
),
And the testing ajaxUrl function
function ajaxUrl(_url)
{
alert(_url);
return false;
}
shows an alert with /cmp/invitacion/ec//td/1
ec parameter should be 5 ¿how can I do it?