[英]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.