点击页面里的登录按钮,弹出一个iframe的登录页面,登录验证成功后设置了Session。
如何让登录成功后iframe自动关闭,并刷新父页,父页读取Session。

解决方案 »

  1.   

    frames[index].style.display = "none"<script type="text/javascript">
        var identity = +new Date;    function doClose() {
            var frames = window.parent.document.getElementsByTagName("iframe");
            
            for(var index = 0; index < frames.length; index++) {
                if (frames[index].contentWindow.identity == identity) {
                    frames[index].style.display = "none";
                    break;
                }
            }
        }</script>
    或者
    boxy
      

  2.   

    刷新父窗体 .
    window.parent.location.reload();
      

  3.   

    可是在Firefox Opera 上iframe刷新父窗口后,父窗口都能读到Session,但就是在IE中读不到。这是怎么回事,需要怎么弄啊?
      

  4.   

    在弹出的窗口中,用表单把用户信息传递给父窗口。然后window.opener=null;window.close;window.parent.reload();
      

  5.   

    iframe内的关闭按钮加上 window.parent.reload()
      

  6.   

    在登录事件  赋值给session后  Session["UserSession"] = result;
      Response.Write("<script>  parent.location.reload();</script>");
      

  7.   

    login 页面是子页面  用上面那个肯定行的~