弹出窗口关闭刷新父窗口。。。。。

blue_butterfly 2003-11-26 11:58:44
我在一个框架的网页里弹出一个窗口,然后在文本框中输入数据,操作完毕之后,需要关闭弹出窗口,然后刷新父窗口,并将文本框中的值传回父窗口(父窗口还要求在原来的框架中被刷新)
...全文
211 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
lois80 2003-12-25
  • 打赏
  • 举报
回复
look
senc 2003-12-12
  • 打赏
  • 举报
回复
这个我应用过的,肯定可以的啦!

<script>
function SubSearch()
{
var aa;
var bb;
var cc;
aa=document.thisForm.aa.value;
bb=document.thisForm.bb.value;
cc=document.thisForm.cc.value;
opener.location="xxxxx.asp?aa="+aa+"&bb="+bb+"&cc="+cc;
window.close();

}
</script>
<form name="thisForm" action="">
<input type="text" name="aa">
<input type="text" name="b b">
<input type="text" name="cc">
<input type="button" name="查询" value="查询">
blue_butterfly 2003-12-12
  • 打赏
  • 举报
回复
谢谢!

谢谢!!

我在父窗口的开头加了一句刷新的代码,这样就相当于刷新了两次,取了两次的值

搞定了!


possible_Y 2003-12-12
  • 打赏
  • 举报
回复
看看你的父窗口的地址栏里的内容是否正确,因为是通过url来传递的
possible_Y 2003-12-12
  • 打赏
  • 举报
回复
test.asp在onbeforeunload,也就是窗口关闭时触发
blue_butterfly 2003-12-11
  • 打赏
  • 举报
回复
t1 t2 t3 分别输入11,22,33

正确的应该返回为:
11
22
33
而现在确返回如下:

11
22, 22
33?t1=11, 33

这是为什么?
blue_butterfly 2003-12-10
  • 打赏
  • 举报
回复
值返回来了

但是为什么返回来了两次?
possible_Y 2003-11-27
  • 打赏
  • 举报
回复
父窗口:
<%
if Request("t1")<>"" And Request("t2")<>"" and Request("t3")<>"" then
Response.Write Request("t1")&"<br>"&Request("t2")&"<br>"&Request("t3")&"<br>"
end if
%>
<input name=mxh onclick="window.open('test.asp')" value="open" type=button>


test.asp
=============
<body onbeforeunload="opener.window.location=opener.window.location+'?t1='+f1.t1.value+'&t2='+f1.t2.value+'&t3='+f1.t3.value">
<form name="f1">
<input type="text" name="t1">
<input type="text" name="t2">
<input type="text" name="t3">
</form>
flytyger 2003-11-27
  • 打赏
  • 举报
回复
关注
blue_butterfly 2003-11-27
  • 打赏
  • 举报
回复
对不起各位,我的弹出窗口是用来做查询条件输入的,返回父窗口的时候我需要把三个值传回去,并且要根据查询条件刷新父窗口.

我该怎样处理?
a_zhe_20 2003-11-27
  • 打赏
  • 举报
回复
<script>opener.location.reload();</script>
blue_butterfly 2003-11-27
  • 打赏
  • 举报
回复
to : possible_Y(一切皆可能)(西南交大)

test.asp中什么时候触发?

在哪里触发?
Ewsq 2003-11-27
  • 打赏
  • 举报
回复
private btnForSubmit(Object sender,EventArgs e)
{
.............
Response.Write("<script>window.opener.document.execCommand('refresh');window.opener='';window.close();</script>");
//string str="<script>window.opener.document.execCommand('refresh');window.opener='';window.close();</script>";
//this.RegisterStartupScript("mycode",str);

}
Ewsq 2003-11-27
  • 打赏
  • 举报
回复
a.htm

<a href="b.htm" target=blank>发表留言</a>
<script>
alert("wwwwwwwwwwwwwwwwwwwwwwwwww");
</script>

b.htm

<script language="javascript">
//window.opener.location.reload();刷新父窗口
//window.opener.location="2.htm"//重定向父窗口到2.htm页
function closewindow()
{
window.opener.location.reload();
self.close();
window.opener.document.write("sssssssssssssssssss");
}
</script>
<a href="b.htm" target=blank onclick="closewindow();">关闭</a>
sinusoid 2003-11-27
  • 打赏
  • 举报
回复
<!--a.htm'父窗口-->
<a href="b.htm" target=blank>发表留言</a>
<!-b.htm'子窗口-->
<script language="javascript">
//window.opener.location.reload();刷新父窗口
window.opener.location="2.htm"//重定向父窗口到2.htm页
self.close();
</script>
blue_butterfly 2003-11-26
  • 打赏
  • 举报
回复
各位帮忙呀!谢谢!

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧