投票问题???

xiaqi1982 2003-10-09 05:24:59
有个投票系统,点击查看时,它弹出个小窗口(400*300)!(votedetail.asp)显示投票结果
但是我投票时,它显示整个页面(800*600)(votedetail.asp)!怎样使他投票后也在弹出小窗口显示!!部分代码如下:
<SCRIPT language=JavaScript>
function windowopen1(loadpos)
{controlWindow=window.open(loadpos,"votewin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=300");
}
</SCRIPT>
...
<form method=post action="vote.asp">
...
<input type=submit value="提交">
<input type=button value="查看"onclick=javascript:windowopen1('votedetail.asp');>
...

vote.asp 代码如下:
<%
rb=Request("rb")
if rb<>"" Then
Set myConnection = Server.CreateObject("ADODB.Connection")
myConnection.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("vote.mdb")
Set tempRs = Server.CreateObject("ADODB.Recordset")
tempRs.ActiveConnection = myConnection
tempRs.Open "Update vote Set c_num=c_num+1 where id="&rb,myConnection,2,3,1

Set tempRs = Nothing
Set myConnection = Nothing
Response.Redirect "votedetail.asp"
End if
Response.Redirect "showvote.asp"
%>
...全文
105 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiaqi1982 2003-10-10
  • 打赏
  • 举报
回复
我改成这样:
Set tempRs = Nothing
Set myConnection = Nothing%>
<script language=JavaScript>window.open("votedetail.asp","votewin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=300");
</script>
<%End if
%>
投票后,先出现页面vote.asp(为空白),然后再弹出votedetail.asp(400*300)!!
怎样使vote.asp不出现,而是直接弹出votedetail.asp(400*300)!
fangpeng2003 2003-10-09
  • 打赏
  • 举报
回复
Set tempRs = Nothing
Set myConnection = Nothing
Response.Redirect "votedetail.asp"
End if
Response.Redirect "showvote.asp"
%>


改为
Set tempRs = Nothing
Set myConnection = Nothing%>
<script language=JavaScript>windowopen1('votedetail.asp')</script>
<%End if
Response.Redirect "showvote.asp"
%>
不老书生 2003-10-09
  • 打赏
  • 举报
回复
去掉Response.Redirect "votedetail.asp"

28,390

社区成员

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

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