我使用 ExtJS 1.0.1(在 magento 中)
我想在表单提交时获取所有已检查的节点。我卡在这里:
tree.html(初始化):
tree<?php echo $this->getId() ?> = new Ext.tree.TreePanel.Enhanced('<?php echo $_divId ?>', {
animate: false,
loader: categoryLoader,
enableDD: false,
containerScroll: true,
rootVisible: '<?php echo $this->getRoot()->getIsVisible() ?>',
useAjax: true,
currentNodeId: <?php echo (int) $this->getCategoryId() ?>,
addNodeTo: false
});
关于提交功能:
function submit()
{
console.log(tree'.$this->getId().');
// got html code <div id="treeoptions_fieldset992cb0dd9a7da511e5596a229a5386d5_select_catalogb0f2cd4faa4f13b72f0df314bdc222ec" class="tree x-tree"><ul class="x-tree-root-ct x-tree-lines" id="ext-gen5859">...</ul></div>
var checked_nodes = tree'.$this->getId().'.getChecked();
// got an error Uncaught TypeError: Object #<HTMLDivElement> has no method 'getChecked'
}
Magento 在管理面板中使用prototypeJS。问题是如何处理checked_nodes 来运行getChecked()?