怪事,关于页面跳转!!紧急求助!!
在点击记卡片按钮时:跳转到tmpPass.asp插入数据后,自动跳回assureSps.asp
在第一次记录插入成功后,再一次点击记卡片按钮后,就出现怪现象:
1、根本不会提示数据已存在,
2、把tmpPass.asp中的文字信息“正在准备信息,请稍后......”改成别的如:"信息,稍后!!!!",还是显示原先没有改过的“正在准备信息,请稍后......"
3、即使在tmpPass.asp最前面加上response.end还是会跳转到assureSps.asp页面,提示信息还是“正在准备信息,请稍后......”
4、在正在跳转时右键选刷新后,会提示:数据库已存在,页面不会跳转!
assureSps.asp部份代码如下:
<SCRIPT language=javascript1.2>
function AddCard(no,url)
{
if (!confirm('真的要登记卡片吗???????'))
return ;
else
{
sUrl='tmpPass.asp'+url+no
open(sUrl,'_self');
}
}
</SCRIPT>
<body>
<Table><tr><td>
<input type=button value="记卡片" name=card onclick="javascript:AddCard('<%=session("contractno")%>','?flag=4&contractno=');">
</td>
</tr>
tmpPass.asp代码如下:
<%
select case request("flag")
case "1"
case "4"
sql="select * from loaninfo where contractno='" & request("contractno") & "'"
set rst=server.createobject("adodb.recordset")
rst.open sql,conn,1,1
if not rst.eof then
response.write "数据已存在"
response.end
else
sql="insert into loaninfo(contractno) values(" & request("contractno") & ""
conn.execute sql
'下面这条跳转后
response.write "<meta http-equiv=refresh content=""2;URL=assureSps.asp"">"
end if
case else
end select
%>
<link rel="stylesheet" href="forum_admin.css" type="text/css">
</head>
<BODY id=all text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#edf2fc topMargin=0 marginheight="10" marginwidth="10">
<table height="50%" cellspacing=0 cellpadding=0 width="100%" align=center bgcolor=#edf2fc border=0>
<tbody>
<tr>
<td height="261">
<table cellspacing=0 cellpadding=0 width="70%" align=center bgcolor=#000000 border=0>
<tbody>
<tr>
<td>
<table cellspacing=1 cellpadding=4 width="100%" border=0>
<tbody>
<tr>
<td width="100%" bgcolor=#e9f4ff>
<div align=center><b>正在准备信息,请稍后......</b></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>