【问题标题】:x-editable: How to update the post URL itself with field values?x-editable:如何使用字段值更新帖子 URL 本身?
【发布时间】:2017-04-21 16:11:02
【问题描述】:

我尝试发布的 API 构造如下:/device/invoiceNumber/{invoiceNumber}/{portableUnitId}

括号中的值必须替换为引导表中动态添加的值。我可以在另一个函数中生成自定义 URL,但是我这里的内容不起作用:

$(this).data('url', postInvNumUrl);

有什么想法吗?

【问题讨论】:

  • 我也遇到了同样的问题。你找到解决办法了吗?

标签: jquery ajax x-editable bootstrap-table


【解决方案1】:

我找到了解决方案,您必须更新editable 本身的选项:

// This is where the magic happens
$(this).editable('option', 'url', postInvNumUrl);

// Not sure if this is needed anymore 
$(this).data('url', postInvNumUrl);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-04-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-29
    • 2022-01-02
    相关资源
    最近更新 更多