Javascript 未捕获类型错误:无法调用方法';遵守';空/未捕获引用的错误:未定义可拖动

Javascript 未捕获类型错误:无法调用方法';遵守';空/未捕获引用的错误:未定义可拖动,javascript,prototypejs,Javascript,Prototypejs,我已经仔细研究了所有相关问题,但找不到问题的答案 当我点击“Kredi Yükle”时,会出现一个弹出窗口,但什么也没有发生,我得到了这些控制台错误 我该怎么办 在相关js文件中: CreditLoadingAmrEditor = Class.create({ SELECTION_WINDOW : "wndCreditLoadingHelper", BUTTON_OK : "btnLoadCreditOk", BUTTON_CANCEL : "btnLoa

我已经仔细研究了所有相关问题,但找不到问题的答案

当我点击“Kredi Yükle”时,会出现一个弹出窗口,但什么也没有发生,我得到了这些控制台错误

我该怎么办

在相关js文件中:

CreditLoadingAmrEditor = Class.create({
SELECTION_WINDOW    : "wndCreditLoadingHelper",
BUTTON_OK           : "btnLoadCreditOk",
BUTTON_CANCEL       : "btnLoadCreditCancel",
CREDIT_AMOUNT       : "fld_credit_amount",

initialize: function(owner) {
    this.owner              = owner;
    this.browser            = owner.browser;
    this.buttonOk           = $(this.BUTTON_OK);
    this.buttonCancel       = $(this.BUTTON_CANCEL);
    this.selectionWindow    = this.initializeHelper(this.SELECTION_WINDOW);
    var containers = $$("div[id='loadingCreditContainer']");
    if (containers && containers.size() > 0) {
        this.container      = containers[0];
        this.editorManager  = new EditorManager("loadingCreditContainer");
        this.creditAmount   = $(this.CREDIT_AMOUNT).instance;
    }
    this.browser.addToolClickListener(this);
    this.buttonOk.observe(iconstants.KEY_CLICK, this.okClick.bindAsEventListener(this));
    this.buttonCancel.observe(iconstants.KEY_CLICK, this.closeClick.bindAsEventListener(this));
},

initializeHelper: function(windowName) {
    var result = $(windowName);
    if (result){
        result.remove();
        document.body.appendChild(result);
    }
    return result;
},

toolClick: function(browser, toolType) {
    if (toolType == browser.TOOL_LOAD_CREDIT) {
        this.show();
    }
    return false;
},

show: function(callback) {
    this.callback = callback;
    FSystem.registerWindow(this.selectionWindow, true, true);
},

hide: function() {
    FSystem.unregisterWindow(this.selectionWindow);
},

okClick: function() {
    if (this.creditAmount.getValue() >= 0) {
        this.hide();
        this.requestForLoadingCredit();
    } else {
        window.alert(localize("value_must_greater_than_0"));
    }
},

closeClick: function() {
    this.hide();
},

requestForLoadingCredit: function() {
    FSystem.startWait();
    new Ajax.Request(
            iconstants.URL_CREDIT_LOADING_AMR,
            {
                method      : iconstants.METHOD_POST,
                parameters  : {mid:this.browser.getSelectedId(),ca:this.creditAmount.getValue()},
                onComplete  : this.responseForDeviceReading.bind(this),
                onException : null
            });
},

responseForDeviceReading: function(transport) {
    FSystem.stopWait();
    var JSON = transport.responseText.evalJSON();
    if (JSON.status == iconstants.AJAX_STATUS_OK){
        //if (confirm(JSON.message)) {
        window.open(JSON.url, '_newtab', 'width=1280,height=800');
        //}
    } else {
        alert(JSON.message);
    }
}

}))

对象未初始化时会发生此类错误。您正在尝试访问此类对象的未初始化方法。请检查您的对象初始化。

据我所知,问题在于buttonOk对象上的“this.buttonOk.observe(iconstants.KEY_CLICK,this.okClick.bindAsEventListener(this));”。我已经初始化了initialize()函数。我看不出有什么问题,我让它工作了。在system.js文件中,选中draggable:function(draggable){if(draggable){var windowHandle=this.windowElement.down(“td[windowHandle='true']”);windowHandle.setStyle({cursor:“move”});new draggable(this.windowElement,{handle:windowHandle,scroll:window}),这个可拖动的元素导致了问题,这很好…但是你找到了根本原因了吗?为什么会这样?很不幸,当我改变可拖动元素时,这次“Filtrel”按钮似乎不起作用。在chrome的控制台中,在这个.buttonOk.observe(iconstants.KEY_-CLICK,this.okClick.bindAsEventListener(this))之后;执行此通道后,立即跳过该js文件并直接转到prototype.js catch(e){if(e!=$break)throw e;}返回此;}LANETH表示对象未初始化,因此出现错误!!