Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery x-可编辑:如何使用字段值更新帖子URL本身?_Jquery_Ajax_X Editable_Bootstrap Table - Fatal编程技术网

Jquery x-可编辑:如何使用字段值更新帖子URL本身?

Jquery x-可编辑:如何使用字段值更新帖子URL本身?,jquery,ajax,x-editable,bootstrap-table,Jquery,Ajax,X Editable,Bootstrap Table,我试图发布到的API的构造如下:/device/invoiceNumber/{invoiceNumber}/{portableUnitId} 括号中的值必须替换为引导表中动态添加的值。我可以在另一个函数中生成自定义URL,但我这里的功能不起作用: $(this).data('url',postInvNumUrl) 有什么想法吗?我找到了解决方案,您必须更新可编辑本身的选项: // This is where the magic happens $(this).editable('option',

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

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

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


有什么想法吗?

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

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

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

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