代码如下:
            Dim Url As String
            Url = "<script language=javascript> " + vbCrLf
            Url += "window.open('RecieveOrderPrint.aspx?" & "Instancecode=" & CStr(InstanceCode) & "')" + vbCrLf
            Url += "window.open('OrderPrint.aspx?" & "Instancecode=" & CStr(InstanceCode) & "')" + vbCrLf
            Url += "window.close()</script>" + vbCrLf            Response.Write(Url)
请问如何解决窗口弹出被屏蔽的问题??

解决方案 »

  1.   

    用模态窗口式式1.模态窗口的打开
    2.模态窗口的关闭
    3.模态窗口的传递参数。
    4.其他。
    1.window.showModalDialog("DialogPage.aspx","newwin","dialogHeight: 200px; dialogWidth: 150px; dialogTop: 458px; dialogLeft: 166px; edge: Raised; center: Yes; help: Yes; resizable: Yes; status: Yes;");2.window.close();3.传值
    ParentPage.aspx:
    window.showModalDialog("DialogPage.aspx?para1=aaa&para2=bbb");DialogPage.aspx:
    string str1=Request.QueryString["para1"].toString();
    string str2=Request.QueryString["para2"].toString();返回值
    DialogPage.aspx:
    window.returnValue="aaa";ParentPage.aspx:
    var str=window.showModalDialog("DialogPage.aspx");
      

  2.   

    有msn列时,就开不了!   不明白在你的Response.Write()之前做一个判断就行了
      

  3.   

    不要用程序自己开窗口,用事件,如<input type=button onclick="window.open()">
      

  4.   

    谢谢各位!谢谢 goody9807() ,net_lover(孟子E章) ....我现在把脚本写到javasript(html里,非.vb中)
    function ShowPrintOrder(InstanceCode)
    {
        window.open('RecieveOrderPrint.aspx?Instancecode=' + InstanceCode,"_blank") ;
    window.open('OrderPrint.aspx?Instancecode=' + InstanceCode,"_blank" );  event.returnValue=false;  //不返回服務端 } 结果只开第一个窗口,第二个还是不开....
      

  5.   

    或许是刷新的原因,不知道到您提供的代码是写在什么位置?如果在弹出第一个窗口后,没有被用户关闭,则很可能无法弹出第二个窗口.
    Good luck.
      

  6.   

    根据各位提示,想到了一个解决方案:
    新开一个窗口,本窗口重导向一个....就开两个了..
    function ShowPrintOrder(InstanceCode)
    {
    window.open('RecieveOrderPrint.aspx?Instancecode=' + InstanceCode,"_blank") ;
    window.open('OrderPrint.aspx?Instancecode=' + InstanceCode,"_self" ); 
    event.returnValue=false;  //不返回服務端
    } 再次谢谢各位!
    并请各位提供补充意见.