我用ext写的页面1,在submit时用iframe进行的页面跳转,跳转到2,
    代码:
        var temurl='/。。/itdInfoAction.do?method=init&channelId='+channelId;
    var win=new Ext.Window({
        width:600,
        height:300,
        buttonAlign:"center", 
        modal:true,
        shadow:true,
        closeAction:"hide",         
        html:'<iframe  id="add_info_ext" src=temurl/>'                         }); 
    return win.show();我的问题是:我想在关闭页面2时,同时刷新页面一,怎么才能做到呢?
(达到和下边同样的功能:window.operner.location.href="页面1的访问路径";//刷新页面1
              self.close();//关闭页面2自己

用ext怎么来实现?

解决方案 »

  1.   


    win.on({
     'hide':function(){ //当关闭这个窗口是执行
        在这里写刷新另一个窗口的代码  
      }
    })
      

  2.   

    对EXT不是很熟,我觉得应该获得页面一的prototype,然后调用刷新方法
      

  3.   

    同意1楼,不过应该这样写,win渲染完毕后,使用:
    win.on('close',function(panel){
        window.operner.location.href="页面1的访问路径";//
    });
      

  4.   

    多谢各位,问题解决了。//我现在需求不再要求刷新页面,只要关闭当前窗口即可
    我的做法是:
    在父页面定一个全局变量:
    1、var win_jsp="";2、
    function init(){
         var win=new Ext.Window({
        
            width:612,
            height:405,
            resizable:false,
            buttonAlign:"center", 
            modal:true,
            shadow:true,
            border:false,
             closeAction:"hide", 
             listeners:{  destroy:function(){search();
                                              } 
                                       } ,
            html:'<iframe  src="'+sinocms+'/itdInfoAction.do?method=init&channelId='+channelId+'"  frameborder=0 framespacing=0 width=100% height="100%" marginheight=0 marginwidth=0 noResize vspale="0"  scrolling="no"/>'                     
         }); 
    win_jsp=win; //把窗口给变量赋值
        return win.show();
    }3、子页面中:
       function close(){
        window.parent.win_jsp.close();
       }