gxh973121

博客园 首页 新随笔 联系 订阅 管理
  75 Posts :: 93 Stories :: 61 Comments :: 0 Trackbacks

要实现功能如下:

父窗口中有数据列表,当对数据进行修改时弹出一子窗口,对数据进行修改,完毕保存后,当关闭子窗口
时,刷新父窗口数据

实现的javascript:

<script language="javascript">
          
function closewin()
          {
             
if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey) //检测窗口关闭事件
             {
                 self.close();
                 window.opener.location.href
=Form1.Hidden1.value;   //不能用window.opener.location.reload(),否则会出提示框
             }
          }
</script>
<body bgColor="darkgray" MS_POSITIONING="GridLayout" onbeforeunload="closewin()";>
posted on 2005-04-05 18:09 gxh973121 阅读(5659) 评论(3)  编辑 收藏 网摘

Feedback

#1楼 2005-04-05 18:13 Loviy.Net      
window.opener.location.href=window.opener.location.href也可以
  回复  引用  查看    

#2楼[楼主] 2005-04-05 18:24 gxh973121      
我父窗口中的数据是条件查询出来的,带有参数,当关闭子窗口时,父窗口要保持原来的状态,Form1.Hidden1.value保存了父窗口的查询参数
  回复  引用  查看    

#3楼 2005-07-06 09:12 我是菜鸟
<%@ page language="java" contentType="text/html;charset=gb2312" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:html>
<script language="javascript">

function uploadover()
{
window.location.reload();
window.opener.document.all["txtName"].value='<%=(String)session.getAttribute("url")%>';
window.close()
}
</script>

<title>success</title>
<head></head>
<body>
<iframe id="eEditorArea" name="eEditorArea" height="50%" width="100%" frameborder="no" src="BrowseWindow.jsp"></iframe>
<%=(String)session.getAttribute("url")%>
<p><html:button property="button" onclick="uploadover()"><bean:message key="all.jsp.over"/></html:button></p>
</body>
</html:html>
谁能给我看看这段代码?问题是父窗口中的数据无法刷新出来

  回复  引用    




发表评论

昵称: [登录] [注册]

主页:

邮箱:(仅博主可见)

评论内容:

  登录  注册

[使用Ctrl+Enter键快速提交评论]

0 132664




相关文章:

相关链接: