开发者

jQuery in CGridView

I am trying to get a CJuiDialogBox on clicking an ajaxLink on a gridView. for that I have to creat the ajaxLink inside the cGridView. I am stuck on the onclick line, there I want to render quotes around the component id. But it is not getting done.

'value' => 'CHtml::ajaxLink("Link",
                    Yii::app()->createUrl("Administrator/settings/edit", array("module"=>$data["module"])),
                    array(
                        "onclick" => "$(\"#juiDialog\").dialog(\"open\"); return false;",
//                        "update" => "开发者_C百科#juiDialog"
                    ),
                    array("id" => "aLink_" . $data["module"])
            )'

What I get in browser source is

{'onclick':'$(\"#juiDialog\").dialog(\"open\"); return false;'

What I look for is

{'onclick':'$("#juiDialog").dialog("open"); return false;'


Did you try just using single quotes for the onclick attribute like:

"onclick" => '$("#juiDialog").dialog("open"); return false;',
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜