如何在确认框后触发Yii1.x中自定义按钮的URL?

时间:2017-04-13 00:40:45

标签: yii

我有一个类似

的自定义按钮
        'reject' => array(
            'label' => 'Reject',
            'imageUrl'=> Yii::app()->request->baseUrl.'/modules/mymodule/assets/images/icons/reject-icon.png',
            'url' => 'Yii::app()->controller->createUrl("mycontrollerName/reject/",array("id"=>$data->id,"asDialog"=>1)',
            'click' => 'function(e){
                    e.preventDefault();
                    if(!confirm("Are you sure you want to reject this data?")){
                        return false;
                    }
                 }
            '
        )

点击“确定”后如何触发网址。来自javascript的cofirm弹出窗口?,我是否缺少javascript中的内容?或者?

0 个答案:

没有答案