A是父页面,B是子页。其中A在框架中
在A中执行
Response.Write("<script>window.open('ChangePWD.aspx', 'newwindow', 'height=400, width=500, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')</script>");
打开了B页
在B中
Response.Write("<script>window.opener.location.reload(true);</script>");
关闭自己便刷新A
现在存在这样的问题
老弹出提示 “单击重试再次发送信息,或单击取消返回你正在查看的页”谁有好点的方法啊,这些鸟东东很折磨人

解决方案 »

  1.   

    父中的 的确js 为
    function add_data(temp,rand)
      {
      var obj = new Object();
     var a=window.showModalDialog("Add_Dd_Rz.aspx?id="+temp+"&rand="+rand,obj ,"dialogWidth=500px;dialogHeight=500px");
     
     if (a=="ok")
     window.location.href=window.location .href;
    }
    子页面的这样调用
    private void Button1_Click(object sender, System.EventArgs e)
    {
                                         
                                                    
                    
                            this.Response.Write ("<script>window.returnValue='ok';window.close ();</script>");  }
      

  2.   

    用replace,不用reloadreload相当于F5刷新。window.opener.location.reload(true);改为:window.opener.location.replace(document.location.href);
      

  3.   

    Response.Write("<script>window.opener.location.reload(true);</script>");
    ----------------------------------------------------------------------Response.Write("<script>window.opener.location.href ='url';</script>");====CSDN 小助手 V2.5 2005年11月05日发布====
    CSDN小助手是一款脱离浏览器也可以访问Csdn论坛的软件
    界面:http://blog.csdn.net/Qqwwee_Com/archive/2005/11/05/523395.aspx
    下载:http://szlawbook.com/csdnv2
      

  4.   

    关闭子窗口。刷新父窗口
    方法一:
    父中的 的确js 为
    function add_data(temp,rand)
      {
     var a=window.showModalDialog("Add_Dd_Rz.aspx?" ,"dialogWidth=500px;dialogHeight=500px");
     
     if (a=="ok")
     window.location.href=window.location .href;
    }
    子页面的这样调用
    <input id="Button1" type="button" value="button" onclick="window.returnValue='ok';window.close();" />
    或者
    function closeWin()
    {
       window.returnValue="ok";
       window.close();
    }方法二:
    父窗口:
    window.open("add.aspx");
    子窗口:
    <script language=javascript>
    function closeWin()
    {
       window.opener.location.reload();
       window.close();
    }
    </script>
      

  5.   

    后来还是自己搞定
    Response.Write("<script>window.opener.location.href=window.opener.location.href;window.close();</script>");