Zend framework 使用dojo的Zend表单:如何获取tabcontainer中textbox的Parentname?

Zend framework 使用dojo的Zend表单:如何获取tabcontainer中textbox的Parentname?,zend-framework,dojo,Zend Framework,Dojo,我正在使用zend dojo表单: 我使用 <?php $this->tabContainer()->captureStart('main-container', array('design' => 'headline'), array( 'style'=>'height:450px;width:500px' )); echo $this->contentPane('tab1',"<div>

我正在使用zend dojo表单: 我使用

<?php $this->tabContainer()->captureStart('main-container', array('design' => 'headline'),
                        array( 'style'=>'height:450px;width:500px' ));
      echo $this->contentPane('tab1',"<div>User Name: $this->form->txtUserName</div>",
                array('region' => 'top','title'=>'General Info'),
                array('style' => 'background-color: white;') );
      echo  $this->contentPane('Contact Info',
                            "<div>User Name: $this->form->txtPassword</div>",
                             array('region' => 'left', 'title'=>'Contact Info'),
                     array('style' => 'width: 200px; background-color: white;') );
      echo $this->tabContainer()->captureEnd('main-container'); ?>
当我点击按钮时,我在使用from.validate时出错,但当打开“联系人信息”选项卡并单击按钮时,它会在左侧角显示消息


如何获取发生错误的文本框id并打开包含该文本框的选项卡。

这是javascript函数:

**函数getParentnameerror\u id{

forvar p=dijit.byIderror\u id.domNode.parentNode;p;p=p.parentNode{

 var id = p.getAttribute && p.getAttribute("widgetId");

    if(id){

        var parent = dijit.byId(id);
        return parent.isContainer ? parent : null;
}
} 
}`** 其中error_id是您的文本框id