小编Pon*_*ngr的帖子

Bootstrap确认数据确认未执行功能

我正在尝试删除确认执行删除当前id数据的函数.

我收到此错误:

未捕获的TypeError:无法读取未定义的属性"call"

在这部分 bootstrap-confirmation.js

return function() {
  context[func].call(this);
};
Run Code Online (Sandbox Code Playgroud)

这是我的按钮代码

<button class="btn btn-danger" data-toggle="confirmation" 
data-    btn-ok-    class="btn-danger" data-btn-cancel-icon="glyphicon 
glyphicon-ban-circle" data-btn-cancel-class="btn-default" 
data-popout="true" data-singleton="true" data-on-confirm="goDel(id)">
Eliminar</button>
Run Code Online (Sandbox Code Playgroud)

这是我的Javascript

<script type="text/javascript">
function goDel(id)
{
location.href="./delete/" + id;
}
</script>
Run Code Online (Sandbox Code Playgroud)

这是我的删除控制器

public function delete($id) {
    $clientes = new Clientes();
    $codcta = new Codcta();
    $this -> codcta = $codcta -> find();
    $codciu = new Codciu();
    $this -> codciu = $codciu -> find();        
    $clientes = new clientes();
    if ($clientes->delete((int)$id)) {
            Flash::valid('El registro se ha eliminado correctamente'); …
Run Code Online (Sandbox Code Playgroud)

javascript twitter-bootstrap

3
推荐指数
1
解决办法
3368
查看次数

标签 统计

javascript ×1

twitter-bootstrap ×1