简体   繁体   English

Extjs 4未捕获的TypeError

[英]Extjs 4 Uncaught TypeError

I am trying to do something like: when user click on the button, the child panel will show/hide 我正在尝试执行以下操作:当用户单击按钮时,子面板将显示/隐藏

but when i press on the button i get this error message : 但是当我按下按钮时,我收到此错误消息:

Uncaught TypeError: Object [object Object] has no method 'child' 未捕获的TypeError:对象[object Object]没有方法'child'

By the looks of things you need to refer to your child panel by it's 'id' which I guess is 'p' from your code above. 从外观上看,您需要通过它的“ id”来引用您的子面板,我猜上面的代码中它是“ p”。

So you'd want something like this: 所以你想要这样的东西:

function: onbtnClick(show) {

    var childPanel = Ext.getCmp('p');
    if(show) {
        childPanel.show();
    } else {
        childPanel.hide();
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 EXTjs:未捕获的TypeError:controller.setView不是函数 - EXTjs: Uncaught TypeError: controller.setView is not a function EXTJs 未捕获类型错误:this.getForm 不是 function - EXTJs Uncaught TypeError: this.getForm is not a function Uncaught TypeError:extjs4中未定义undefined吗? - Uncaught TypeError: undefined is not a function in extjs4? 未被捕获的TypeError:binding.destroy不是ExtJs 5中的函数 - Uncaught TypeError: binding.destroy is not a function in ExtJs 5 未捕获的TypeError:controller.setView不是EXTJS中的函数 - Uncaught TypeError: controller.setView is not a function in EXTJS JSONP在ExtJS 4上不起作用-未捕获的TypeError:无法调用未定义的方法“子字符串” - JSONP not working on ExtJS 4 - Uncaught TypeError: Cannot call method 'substring' of undefined Extjs5 treepanel [未捕获的TypeError:无法读取未定义的属性&#39;create&#39;] - Extjs5 treepanel [Uncaught TypeError: Cannot read property 'create' of undefined] ExtJs错误:未捕获TypeError:无法读取未定义的属性&#39;removeCls&#39; - ExtJs Error: Uncaught TypeError: Cannot read property 'removeCls' of undefined Extjs:未捕获的TypeError:对象# <Object> 没有方法“读取” - Extjs: Uncaught TypeError: Object #<Object> has no method 'read' extjs 4Uncaught TypeError:无法读取未定义的属性“ items” - extjs 4Uncaught TypeError: Cannot read property 'items' of undefined
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM