A页面test3.asp代码:
<form action="do3.asp" method="post" name="form1" target="_blank">
<input type="radio" name="id" id="radio<%=(subcate.Fields.Item("id").Value)%>" value="<%=(subcate.Fields.Item("id").Value)%>" onclick="document.form1.submit();javascript:location='do3.asp'">
B页面do3.asp代码:
..... '处理过程
<% response.redirect "test3.asp" %>
把你的代码加进来成:
..... '处理过程
<% response.redirect "test3.asp" %>
<script>window.close()</script>
不管用,是我写得不对吧?
<form action="do3.asp" method="post" name="form1" target="_blank">
<input type="radio" name="id" id="radio<%=(subcate.Fields.Item("id").Value)%>" value="<%=(subcate.Fields.Item("id").Value)%>" onclick="document.form1.submit();javascript:location='do3.asp'">
B页面do3.asp代码:
..... '处理过程
<% response.redirect "test3.asp" %>
把你的代码加进来成:
..... '处理过程
<% response.redirect "test3.asp" %>
<script>window.close()</script>
不管用,是我写得不对吧?
这一行就跳转了可以把 response.redirect "test3.asp"改成 response.write "<script>location.href='test3.asp'</script>"
给分吧.....
//你的处理
window.close();
}
function func(){ window.close();
}
中去啊?
我的过程是这样的:
<%if(request.form("id") <> "") then xg__varid = request.form("id")%>
<%set xg = Server.CreateObject("ADODB.Command")
xg.ActiveConnection = MM_kaoshi_STRING
xg.CommandText = "UPDATE answer SET selected=1 WHERE id=" + Replace(xg__varid, "'", "''") + ""
xg.CommandType = 1
xg.CommandTimeout = 0
xg.Prepared = true
xg.Execute()%>
<input name="categorytext" type="text" size="40">
<input type=button style='width:60' value="Choose..." onClick="javascript:window.showModalDialog('b页面', window, 'dialogHeight: 400px; dialogWidth: 350px; dialogTop: 200px; dialogLeft: 300px; edge: Raised; center: yes; help: no; resizable: no; scroll: yes; status: no;')">
在这里把window作为参数传进showModalDialog中去,即第二个参数。
然后再第二个页面b页面中,触发某个时间后执行javascriptfunction selectedNode(ob, id, name) {
//对a页面中的进行赋值
window.dialogArguments.document.getElementById('categoryId').value = id;
window.dialogArguments.document.getElementById('categorytext').value = name;
window.close();//关闭b页面
}
{
window.setTimeout("aa()",3000,"javascript");
function aa()
{
link.click();
}
}
</SCRIPT>
<a href="javascript:history.back(-1);" id="link">Back</a>
3秒钟之后自动返回,或者按下back返回