1
にURL]列内のJavascriptを置く:私は私のGridView内のこれらのボタンを置くしようとしているのYiiのGridView
$extraButtons = array(
'class'=>'CButtonColumn',
updateButtonLabel => 'Atualizar',
deleteButtonLabel => 'Excluir',
viewButtonLabel => 'Visualizar',
deleteConfirmation => 'Deseja realmente excluir este ítem?',
buttons => array(
'btnCVs' => array(
'label'=> 'See resumes',
'url'=> 'javascript:viewResumes($data->id_professional)', //here is the line
'imageUrl' => '/gammarh/assets/dad4ddbc/gridview/cvs.gif',
'visible' => 'true',
)),
template => '{btnCVs} {view} {update} {delete}',
viewButtonOptions => array("target" => "_blank"),
);
は、生成された各ラインの内側の機能を置くのが好きI`d。私はエラーが表示されることを行うと:、文字でurlencode ...と何を使用します。
Parse error: syntax error, unexpected ':' in /Applications/MAMP/htdocs/yiiroot/framework/base/CComponent.php(616)
I`veはすでに脱出しようとしました。
誰かがそれを解決する方法を知っていますか?あなたが行うことができるはず
おかげで、
アルマンド
できます。したがって、この文字列はまだeval()で処理されます。 – armandomiani