我是用showmodeldialog打开一个网页对话框,然后想在关闭网页对话框的时候刷新父窗口,
Response.Write("<script>window.dialogArguments.location.reload(true);</script>"); 
Response.Write("<script>window.close();</script>");
出现重新发送信息,则无法刷新网页的错误?是怎么回事啊?
我是用
string StrUrl="TuiHuoAmount.aspx?gsbh="+gsbh+"&ck="+ck+"&cj="+cj+"&xh="+xh+"&pzh="+pzh+"&ph="+ph+"&amount="+amount;
string strTmp=string.Format("<script>window.showModalDialog('{0}',window,'dialogWidth:350px;dialogHeight:100px;status:0;resizable:1;help:0')</script>",StrUrl);
//Page.RegisterClientScriptBlock("fjava",strTmp);
Page.Response.Write(strTmp);

解决方案 »

  1.   

    http://www.efun.cc/kevin/article.asp?id=7
    解决此问题,应该这样写:
    window.location.href=window.location.href; 
    window.location.reload;
    同理,如果是刷新父窗口,应该这样写:
    window.opener.location.href=window.opener.location.href;
    window.location.reload;
    这种写法就不出现那讨厌的对话框啦! 
    http://www.cnblogs.com/huobazi/archive/2004/04/06/5325.aspx
    弹出窗口刷新它的父页面后。出现不重新发送信息,则无法刷新网页 
    做的东西弹出一个窗口处理某些动作后刷新父窗口

    window.opener.location.reload();
    刷新
    如果父窗口在此之前如果有过提交数据的动作,则会出现这么个讨厌的对话筐
    “不重新发送信息,则无法刷新网页”
    痛苦......
    CSDN搜索未果(有几贴都是用Response.Redirect的方法,但我这里是刷父窗口)。
    痛苦.
    ........
    翻我的小本本 后找到办法

    window.opener.location.href=window.opener.location.href
    去刷新(其实是重定位了一下)父窗口
    可行。
    总结: 不能一棵树上掉死 :P
      

  2.   

    Response.Write("<scriptlanguage=javascript>window.opener.location.href=window.opener.location.href;<" + "/" + "script>");这方法不错