大家好,问下大家以下这个功能大家是怎么实现的1.在b/s模式下 弹出模式窗体要怎么实现,
2.如模式窗体为修改表单的业务逻辑,如果在按下确定后,父窗体刷新相应的数据注:父窗体与子窗体为不同的webForm,Javascript中如何刷新父窗体数据,这个功能很普遍,问下大家都是怎么实现的

解决方案 »

  1.   

    父: 
    function OpenModalDialog() 

    var recdata=false; 
    try 

    recdata=showModalDialog("ShareSoftWareAuditingUpdate.aspx","newwindow","dialogHeight:600px;dialogWidth:800px; dialogTop:screen.height/4;dialogLeft:screen.width/4; edge:sunken ; center: Yes; help: No; resizable: No; status: No; scroll:yes;"); 
        if(recdata==true) 
        { 
        // 刷新当前窗口 
      window.location.href =window.location.href; 
              window.location.href.reload(); 
      
        } 
    } catch(err) 
    {} 
    } 子: 
    在保存操作加: 
    string strScript = @" <script>window.returnValue=true;window.close(); </script>"; 
    this.Response.Write(strScript);
      

  2.   

    string strScript = @" <script>window.returnValue=true;window.close(); </script>";
    this.Response.Write(strScript);
    这个已经解决你第二个问题了
      

  3.   


    window.location.href.reload(); 改成
    window.location.href = window.location.href;
      

  4.   

    恩,没错,别用reload,改成写链接
      

  5.   

    http://topic.csdn.net/u/20091112/09/342769c1-0abf-4f92-8699-7ac7d462e0cf.html
      

  6.   

    B/S模式下的弹出窗口一般都不用window.open或者showModuleDialog了,限制太多,浏览器兼容性不好。
    我一般用div(DIV+IFRAME)来模拟弹出一个新窗口的问题
      

  7.   

    用div弹出一个遮罩层
    这样还不因为客户的安全限制而影响
      

  8.   

    楼主 别着急..
    参考:1、http://topic.csdn.net/u/20091029/15/b1e0e1b0-2d84-4a61-a207-a51eafb56ebd.html
       2、http://topic.csdn.net/u/20091020/16/b3e78af2-add8-422f-a2ae-67dd58c33a84.html
      

  9.   

     window.opener.location.reload();
      

  10.   

    Response.Write("<script type='text/javascript'>window.opener.location.reload();</script>");
      

  11.   

     var result=showModalDialog("aaa.aspx","",'dialogWidth:'+ objs.width +'px;dialogHeight:'+ objs.height +'px;center:yes;help:no;resizable:no;status:no'); //'//dialogWidth:600px;dialogHeight:500px;center:yes;help:no;resizable:no;status:no' 
    if(result)
    {
    父画面.form.submit();
    }
    然后在父画面的pageLoad里写查询重新给父画面赋值就好了。
      

  12.   

    var result=showModalDialog("aaa.aspx","",dialogWidth:600px;dialogHeight:500px;center:yes;help:no;resizable:no;status:no' );  
    if(result) 

    父画面.form.submit(); 
    }