代码贴出来
可能是jsp文件的代码有问题

解决方案 »

  1.   

    <%@ page
    language="java"
    pageEncoding="GB2312"
    %>
    <%@page import="java.io.*,
           java.util.Date"%><%
    Object cancelCmd = request.getParameter("CommandCancelSpec");String title = "error";
    if("true".equals(cancelCmd)){
    title = "infomessage";
    }
    %>   
    <HTML>
    <HEAD>
     <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=GB2312">
     <META NAME="Generator" CONTENT="HETEMULU Writer Ver2.06">
     <TITLE><%=title%></TITLE>
     <STYLE>
      .DIALOG-PAGE {background-color: #D0FFD0;}
      .NORNAL-BUTTON{text-valign: center;text-align: center; width:81px;height:25px;font-size:15px;}
     </STYLE>
    </HEAD><BODY class="DIALOG-PAGE"  onload="if(opener) opener.blockEvents();" onunload="processUnload();"><DIV align="center">
    <!--H3><FONT color="red">error发生</FONT></H3--><%
    if("error".equals(title)) {%>
    <%@ taglib uri="ems-taglib"   prefix="ems" %>
    <ems:errors >
    </ems:errors>
    <BR>
    <%
    }else{
    %>
    <BR>
    <H3><FONT color="red">command输入错误</FONT></H3>
    <%
    }
    %><%
    if("error".equals(title)) {
    %>
    <BR>
    <%
    }
    %><%
    Object result = session.getAttribute("CommandStopped");
    session.removeAttribute("CommandStopped");
    String strClickAction = "";
    String strBtnValue = "关闭";
    if(result != null && "resultNg".equals((String)result)) {
        
    strClickAction =  "opener.doAction();";

    strBtnValue = "返回";
    }
    //System.out.println("strClickAction is " + strClickAction );  
    %>
    <SCRIPT>
    function processUnload() {
    if(opener) {
    opener.unblockEvents();
    }

    document.closeForm.runOperation.value="false";
       <%=strClickAction%>
      
       if(opener.enableButtons) {
            <%if("".equals(strClickAction)) {%>
         opener.enableButtons();
         <%}%>
       } 
    }function operation() {
       /*document.closeForm.runOperation.value="false";
       <!--%=strClickAction%-->
      
       if(opener.enableButtons) {
            <!--%if("".equals(strClickAction)) {%-->
         opener.enableButtons();
         <!--%}%-->
       }*/
       window.close();
    }
    </SCRIPT>
    <FORM name="closeForm">
    <INPUT type="hidden" name="runOperation" value="true">
    <INPUT name="close" class="NORNAL-BUTTON" type="button" onClick="operation()" value="<%=strBtnValue%>">
    </FORM>
    </DIV>

    </BODY>
    </HTML>
      

  2.   

    if(opener) opener.blockEvents()应该是上面这句的问题,你的blockEvents()方法是干什么的?
      

  3.   

    因为要在NetScape7.1下实现模态对话框,而NetScape7.1不支持,所以只能模拟模态对话框。
    opener.blockEvents()将父窗口上的事件阻塞掉,这句应该没有问题。(单独测试过这个方法)
      

  4.   

    <%@page import="java.io.*,
           java.util.Date"%>
    是不是少了引號?
    JSP不懂。。