求助:求高人指点,如何取消刷新父页面时提示重试或者取消呢?
代码如下<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script LANGUAGE="Javascript">
function new_price(AS_id,AS_name,AS_GG,AS_DJ)
{
var strConnA;
strConnA="价格修改.asp?AS_id="+AS_id;
var strWin = window.showModalDialog(strConnA,'','dialogWidth=300px;status=no'); //关闭时刷新
window.location.reload();
}
</script>
<title>产品查询系统</title>
</head>
<%
strconn = "Driver={sql server};Server=(local);Database=northwind;uid=sa;pwd=gwtt@123" '定义数据库驱动,sql服务器,数据库名......
set conn = server.createobject("adodb.connection") '创建Connection对象
conn.CursorLocation = 3
conn.open strconn
response.write "<b>您输入的产品为:"&request.form("nameIn")&""
sql="select productid,productname,quantityperunit,unitprice from products where "
if request.form("B1") = "" then
sql = sql & " 1>1 "
else
sql = sql & " 1=1 "
end if
If request.form("nameIn")<>"" then
sql= sql & " and productname like '%" & request.form("nameIn") & "%'"
End If
If request.form("unitpricedown")<>"" and request.form("unitpriceup")<>""then
sql= sql & " and unitprice between "&request.form("unitpricedown")&" and "&request.form("unitpriceup")&" order by unitprice"
End If
set rs= Conn.Execute(sql)
%>
<form name="form1" method="post" action="产品查询系统.asp">
<p>产品名称<input type="text" name="nameIn" size="20" value=<%=request("nameIn")%>></p>
<p>产品单价<input type="text" name="unitpricedown" size="7" value=<%=request("unitpricedown")%>>
至<input type="text" name="unitpriceup" size="9" value="<%=request("unitpriceup")%>"></p>
<p> <input type="submit" value="查询" name="B1"></p>
</form>
<table border="1" width="80%">
<tr>
<td width="7%" align="center">编号</td>
<td width="30%" align="center">产品名称</td>
<td width="30%" align="center">规格</td>
<td width="23%" align="center">单价</td>
<td width="16%" align="center">操作</td>
</tr>
<% DO while not rs.eof %>
<tr>
<td><%=rs("productID")%></td>
<td><%=rs("productname")%></td>
<td><%=rs("quantityperunit")%></td>
<td><%=rs("unitprice")%></td>
<td><input type="button" value="价格修改" name="B4" onclick="new_price(<%=rs("productID")%>)"></td>
</tr>
<% rs.MoveNext
Loop
%>
</table>
<p> </p>
<% rs.Close %>
<% conn.Close %>
</html>