你可以在那个窗口中写一个方法,
这个方法完成那个窗口的提交,然后使用
window.openner.method这样应该可以吧

解决方案 »

  1.   

    你用frame的时候每个框架都有个名字。
    比如你的frame有3个页面名字分别为:left,top,main
    如果你的子窗口是在main中打开,查询按钮在left中
    你就可以这样来执行window.opener.parent.left.xxxform.search.submit(),
      

  2.   

    难道iframe内嵌也是子窗口?
    ft,我试了一下,还是不行
      

  3.   

    是这样的,我有个大的主页面,查询条件和查询按钮都是写在一个jsp里include在主页面里面的,查询结果则是用iframe内嵌在主页面中,现在我要在查询结果中改变一个任务的状态,于是我再window.open一个小窗口,在这里面实现改变状态的action,改变状态后我需要刷新查询的任务和关闭小窗口,因为查询的结果是用从数据库中提取的,所以单纯的刷新查询结果页面无法刷新状态的改变,所以就需要重新提交查询按钮
      

  4.   

    还有一个问题,刷新父窗口除了window.opener.lacation.reload()和window.location.href=window.location.href;
    window.location.reload;
    之外,还有其他方法没有?
      

  5.   

    窗口提交表单后关闭,同时刷新父窗口的问题! 
    用了几种方法,但都遇到了问题!很苦闷!望高手解救! 1.window.opener.location.reload(); 
    会出现讨厌的对话框"不重新发送信息,则无法刷新网页" 
    2.window.opener.location.href=window.opener.location.href 
    不出现对话框,但会丢失信息,等于每刷新一样 
    3.response.Redirect() 
    好像是刷新子窗口的吧?至少我还不会用它来解决这个问题。行吗???
      

  6.   

    window.opener.location.href=window.opener.location.href 
    我们是用这个的具体出现什么信息,要看你这个href是什么,如果是提交的连接是 submit时候提交给服务器的链接,比如(xxxxxxx.do),而不是什么静态的(xxxxxxxx.screen),就应该没问题。
      

  7.   

    主页面代码如下:<%@ page contentType="text/html;charset=gb2312" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/pager-taglib.tld" prefix="pg" %>
    <script language='javascript' src='/einsure/js/main.js' ></script>
    <script language='javascript' src='/einsure/js/taskManage.js' ></script>
    <link rel="stylesheet" type="text/css" href="/einsure/stylesheets/main.css">
    <link rel="stylesheet" type="text/css" href="stylesheets/css.css">
    <title></title>
    <%@ include file="/include/admHead.jsp" %>
    <body class="bg2" bgproperties="fixed" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" text="#000000">
     <%@ include file="/include/manageQueryHead.jsp" %>         

    <TABLE class=main_tab id=mainTable  height=240 cellSpacing=0 cellPadding=0 width="100%" border=0>
      <TBODY style="DISPLAY: block">
       <TR>
        <TD>
          <IFRAME style="Z-INDEX: -1" name=main0 align=right marginWidth=0 
          marginHeight=0 src="" frameBorder=1 
          width="100%" scrolling=yes height=220>
        
          </IFRAME>
        </TD>
       </TR>
      </TBODY>
      </tr>
    </table>
    <%@ include file="/include/copyright.jsp" %>  
    <body>
      

  8.   

    manageQueryHead.jsp的页面代码:
     <form name="checkQueryForm" method="post" action="" onsubmit=""> 
          。
          。
          。
          。
          。
          。
          。    <table border="0" cellspacing="1" cellpadding="3" width="100%">
          <tr> 
            <td width="70%" align="right" bgcolor="#DFDFDF"><input type="button" class="bu2" onclick="return exp();" value="   导  出   " /></td>
            <td width="30%" bgcolor="#DFDFDF" align="center">           
              <input type="button" name="search" class="bu2" onclick="return query(sendSTime.value,sendETime.value,tempSTime.value,tempETime.value,checkSTime.value,checkETime.value,sureSTime.value,sureETime.value,finishSTime.value,finishETime.value);" value="   查  询  " />          
            </td>        
          </tr>
        </table>
            
     </form> <script language="javascript">
     function query(sendSTime,sendETime,tempSTime,tempETime,checkSTime,checkETime,sureSTime,sureETime,finishSTime,finishETime)
     {    if(checkDate(sendSTime)&&checkDate(sendETime)&&checkDate(checkSTime)&&checkDate(checkETime)&&checkDate(tempSTime)&&checkDate(tempETime)&&checkDate(sureSTime)&&checkDate(sureETime)&&checkDate(finishSTime)&&checkDate(finishETime))
        {
           //alert("tempSTime"+tempSTime);
        
       var strURL="../taskAction.do";
      checkQueryForm.action=strURL;
      checkQueryForm.target="main0";
      checkQueryForm.submit();    
        }
        else
        {
         alert("输入的日期格式不正确!请按2004-05-26 11:20格式输入。");
        }    
     
     } </script>
     <script>
    function exp()
     {    
       var strURL="../exportAction.do";
      checkQueryForm.action=strURL;
      checkQueryForm.target="_blank";
      checkQueryForm.submit();    
     
     } 
     </script>
     
      

  9.   

    其中checkQueryForm.target="main0"的main0是iframe的name
    iframe的代码我需要帖出来么?不需要了
    我在iframe里面window.open了一个小窗口,在这个小窗口里我可以改变任务状态,submit,然后执行action 后struts指向一个命名为selfclose的html页面
    我现在就是要在selfclose.html里面实现重新提交查询按钮和关闭小窗口的功能