popup - 语法错误 : missing ; before statement in kendoui

标签 popup kendo-ui kendo-grid

当我点击更新按钮弹出剑道网格时,怎么会出现这个错误?

  • Firefox 浏览器中的错误是这种形式:SyntaxError: missing ; before d.0=value
  • 在 Chrome 浏览器中:Uncaught SyntaxError: Unexpected number

  • 我已经上传了一个关于这个错误的视频,用于详细说明

    Jsfiddle Code

    Video

    代码

    transport: {
        read: {
            url: 'https://dl.dropboxusercontent.com/sh/u9oxg5f6uweqh40/CbR3pNVg04/documentj',
            dataType: 'json',
            type: 'get',
            cache: false
            },
        update: function(e) { return true; }
    }
    save: function (e) {
        var that = this;
        $.ajax({
            url: '/echo/json',
            type: e.model.id == null ? 'POST' : 'PUT',
            contentType: 'application/json',
            dataType: 'json',
            data: JSON.stringify(e.model),
            success: function (data) {
                // Alertify.log.success(data);
                console.log('ok dadasaved');
                that.refresh();
            },
            error: function (data) {
                //  Alertify.log.error(data);
                console.log('no datasaved');
                that.cancelRow();
            }
        });
    }
    

    最佳答案

    您应该提供更多代码来检测您的代码有什么问题,但请阅读 this可以帮助你:

    Such error occurs when the transport definitions are inconsistent. In other words, if you would like to use custom transport method, all transport types should be defined as functions.

    Having a standard read transport and custom update is not supported. Please configure all transports as functions and let me know if the error still occurs.

    关于popup - 语法错误 : missing ; before statement in kendoui,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18271731/

    相关文章:

    javascript - IE 中的kendoui 拆分器错误

    kendo-ui - 剑道窗口 : how to set header height?

    angular - Kendo UI Angular Grid Detail 模板 "+"图标移动到最后一列

    validation - Kendo 数据网格 "Add new Record"忽略验证规则

    json - Kendo UI Grid JSON DataSource 未加载数据

    c# - 当弹出窗口打开时,单击 Windows 标题栏的最小化、最大化和关闭按钮不起作用

    jquery - 简化冗余的 jQuery 代码

    windows - 为什么弹出窗口上的图标和按钮有时看起来不一样?

    javascript - Kendo UI 网格弹窗编辑自定义模板 - 添加多选控件

    cocoa - 如何在Cocoa中实现自己的弹出控件?