我在一个页面里探出Ext的window,window里是一个iframe网页.function doubleClick(name,cellid){
   if(name==null||name==undefined){
   name="";
   }
   /*****EXT 提示框*****/
     var vUrl = "<iframe src=\"check.do?name="+encodeURI(encodeURI(name))
      +"&cellid="+cellid+"&t="+new Date().getTime()+"\" name='ifr' id='ifr' width='100%' marginwidth='0' height='100%' marginheight='0' scrolling='auto' frameborder='0'></iframe>";
     win=new Ext.Window({title:"修改单元信息",
   width:350,
   height:200,
   modal:true,
   html:vUrl,
   listeners:{"beforedestroy":function(obj) 
       {   
   } 
   }
  }); 
  win.show(); 
}
我现在在这个弹出的windo上的iframe怎么关闭这个window?
崩溃啊...

解决方案 »

  1.   

    iframe 对象 objIframeobjIframe.parentNode.parentNode.removeChild(objIframe.parentNode);
      

  2.   


    window 设置id
    然后在关闭iframe的时候 
    Ext.getCmp()获取window
    然后close
      

  3.   


    还是不行啊!!!想想:iframe可是在Ext.Window里面啊!
      

  4.   


    这个早试过了,窗口移除了,但CSS的效果还在啊,全屏都是....
      

  5.   

    学学看ext的api吧,否则这种问题
      

  6.   


    真因为翻不到API的解决办法才来问的.那你帮我翻翻.
      

  7.   

    closable:true
    win.close()  close() 
    关闭window,在DOM中移除并摧毁window对象。在关闭动作发生... 
    关闭window,在DOM中移除并摧毁window对象。在关闭动作发生之前触发beforeclose事件,如返回false则取消close动作。Closes the window, removes it from the DOM and destroys the window object. The beforeclose event is fired before the close happens and will cancel the close action if it returns false. 
    参数项: 
    None. 
    返回值: 
    void  
    这种东西api上怎么可能会没有
      

  8.   

    有谁明白我在说什么????
    谁不知道在创建的时候用创建的window的close关闭啊!这个我还用问?
    麻烦看完我的问题再回答好不好?
      

  9.   

    参考:(跟你遇到了差不多的问题)
    有a,b两个页面,a页面为主页面,有按钮一个,点击按钮弹出一个windows对象,在其中显示b页面。b页面中也有一个按钮,点击关闭窗口。
    a.htm (部分代码)<script type="text/javascript">
    function openWindow(id,title,url,width,height){
        var win = Ext.get(id)
        if (win) {
            win.close();
            return;
        }
        win = new Ext.Window({
            id:id,
            title:title,
            layout:'fit',
            width:width,
            height:height,
            closeAction:'close',
            collapsible:true,
            plain: false,
            resizable: true,
            html : '<iframe frameborder="0" width="100%" height="100%" src="'+url+'"></iframe>'
        });
        win.show();
    }function myfunction(){
        openWindow('b-win','窗口中打开b页面','b.htm',400,300);
    }
    </script>
    <input type="button" name="button1" value="打开窗口" onClick="myfunction()">
    b.htm(部分代码)
    <script type="text/javascript">
    function closewin(){
        var win = parent.Ext.getCmp('b-win');
        if (win) {win.close();}
    }
    </script>
    <input type="button" name="button1" value="关闭a打开的窗口" onClick="closewin()">