Response.Redirect("adTopMsg.aspx");Response.Write("<script language=javascript>window.opener.location.href=window.opener.location.href;</script>");这样就是刷新不了父页,请哪位高手指点一二

解决方案 »

  1.   

    Response.Redirect("adTopMsg.aspx");干吗还要转一个页面
    如果要提示信息都在js里面写吧
    Response.Write("<script language='javascript'>alert('操作成功!');opener.location.href=opener.location.href;close();</script>");
      

  2.   

    我不需要提示信息我在iFrame子页中更改完父页中的数据之后想让父页刷新,得到更新后的数据
      

  3.   

    在Iframe里面,应该用:window.parent.location.href=window.parent.location.href
      

  4.   

    window.parent.location.href=window.parent.location.href还是一样不好用呀怎么办呀?????????我的这个代码是写在后台的
      

  5.   

    window.parent.location.href=window.parent.location.href
    应该是没有问题的,在你我子页的body的onload里面加上对应的事件,注意,onload是客户端的那个.
    比如说:
    <html>
    <script>
    function reload()
    {
    window.parent.location.href=window.parent.location.href;
    return false;
    }
    </script>
    <body onload="reload()">
      

  6.   

    在子页面的保存代码里调用父页面的js脚本里的刷新函数子页面代码:
    Response.Write("<script language='javascript'>window.parent.Refresh()</script>");
    父页面的js脚本<SCRIPT type="text/javascript">
    function Refresh()
    {
      window.location.href=window.location.href;
    }
    <\SCRIPT >
      

  7.   

    suzh1133(suzh)你好!我按您的代码写上了,可是不好使呀调用不了父页的JS脚本呀
      

  8.   

    这个Response.Redirect("adTopMsg.aspx");命令执行以后,后面都内容都不会执行的。不信,你可以试试。Response.Write("<script language=javascript>window.opener.location.reload(true);</script>");
    Response.Redirect("adTopMsg.aspx");
    我想这个JS才是正确的写法,因为href=href是某些浏览器不支持的