window.parent 表示父窗口window.opener 表示打开当前窗口的那个窗口
window.parent.opener表示打开父窗口的那个窗口,你有没有搞错??

解决方案 »

  1.   

    子窗口传值代码   for(var i=0;i<_goodsinfo.length;i++)
                   {
                        
                       var array = _goodsinfo[i].split(',');
                      window.parent.opener.document.getElementById("goods"+i.toString()).value=array[11];
                       window.parent.opener.document.getElementById("remon"+i.toString()).value=array[12]
                      window.parent.opener.document.getElementById("noair"+i.toString()).value=array[13]
                        for(var j=1;j<11;j++)
                        {
                           window.parent.opener.document.all.MainDataListBox.rows(i+1).cells(j).innerText=array[j-1];
                          
                        }
                        
                        _price = new Number(array[7])
                        _num = new Number(array[8])
                         _sum = _sum+_num*_price
                   }父窗口代码
    function IfNullRowT(rowid)
    {
        alert(2);
       _code = document.getElementById("code"+(rowid-1).toString());   
       
       _name = document.getElementById("name"+(rowid-1).toString());
       
       if(_code.value !="" && _name.value !="")
       {
          return true;
       }
       else
       {
         return false;
       }
    }
    就是找不到code, 如果不打开子窗口就能找到code控件
      

  2.   

    去掉parent,测试过了也是找不到