Answer the question
In order to leave comments, you need to log in
Yii CCheckBoxColumn call js function?
how to call js function on click on checkbox?
$myarray[] = array(
'name' => 'active',
'class' => 'CCheckBoxColumn',
'checked' => '0',
'value' => '$data->id',
'header' => $c,
//'checkBoxHtmlOptions' => array('onclick' => '$.get(\'/admin/page/active/id/\'+this.value+\'/e/\'+(this.checked?1:0),\'\',function(data){} );')
'checkBoxHtmlOptions' => array('onclick' => 'write()'),
/*'onchange' => 'javascript:'
. 'if(this.checked)'
. ' document.getElementById("elem[$i][$c]").value= new Date().toLocaleDateString() +" "+ new Date().toLocaleTimeString(); '
. 'else document.getElementById("Engine_recovered").value="";'*/
);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question