0

このコードでは、内部関数 callbackCurrency はスパン ID の変更を変更できません。これは他の関数からのコールバック関数です。console.log に「No_MODIFICATION_ALLOWED」というエラーが表示されます

loadAccForConVoucher = function() {
    document.getElementById('conFromAccount').innerHTML = "";
    document.getElementById('conToAccount').innerHTML = "";
    $.mobile.eazydb.transaction(function(tx) {
        tx.executeSql('SELECT Account_Name FROM Account WHERE Account_Parent_ID IN("bank", "cash")', [],
            function(tx, rs){
                if(rs.rows.length == 0) {
                    alert('There is no account. please create accounts in bank or cash group to use this feature.');
                } else {
                    $.mobile.changePage( $("#contraVoucher"), { transition: "none"} );
                    for(var i = 0;i < rs.rows.length; i++) {
                        $("#conFromAccount").append('<option value="'+rs.rows.item(i).Account_Name+'">'+rs.rows.item(i).Account_Name+'</option>');
                        $("#conFromAccount").selectmenu("refresh");
                        $("#conToAccount").append('<option value="'+rs.rows.item(i).Account_Name+'">'+rs.rows.item(i).Account_Name+'</option>');
                        $("#conToAccount").selectmenu("refresh");
                    }

                    var callbackCurrency = function(response){ 
                        alert('response is : '+response);
                        document.getElementById('currency').innerHTML = response;
                    }
                    getCurrency(callbackCurrency);
                }
          });
      });
}
4

0 に答える 0