1
私はX-編集可能とスクリプトから返された値を更新する方法を解決しようとしています。X-編集可能な、setValueが動作していないようです
<h2 id="store-editible-url" data-type="text" data-pk="1" data-name="store_url">test value</h2>
、スクリプト:HTMLは、それが(原因事実にURLが有効なものではありません)のような動作しませんが
$(document).ready(function(){
$('#store-editible-url').editable({
url: 'http://www.example.com/cgi-bin/art/my-store.cgi',
onblur: "submit",
placeholder: "Click to set a custom URL",
emptytext: "Click to set a custom URL",
params: { action: "update_store_url" },
success: function(response, newValue) {
$('#store-editible-url').editable('setValue',"foo",true);
}
});
});
ここでは、フィドルです。
考えられるのは、サーバーがいくつかのサニタイズを行い、その値をブラウザに戻すことです。 Howeve4r、私のデモコードを簡単にするために:
$('#store-editible-url').editable('setValue',"foo",true);
私はエラーは発生しませんが、更新はされていません。
http://jsfiddle.net/nrtrdo39/1/setValue
任意のアイデア:ここではフィドルはありますか?