投票系统的过程编写:不知错在哪里?

Anajian 2005-06-19 05:29:41
过程代码:

sub ShowVote()
dim sqlVote,rsVote,i
sqlVote="select top 1 * from Vote where IsSelected=True"
Set rsVote= Server.CreateObject("ADODB.Recordset")
rsVote.open sqlVote,conn,1,1
if rsVote.bof and rsVote.eof then
response.Write "  没有任何调查"
else
response.write "<table><form name='VoteForm' method='post' action='vote.asp' target='_blank'><td>"
'response.write "    <font color=red>" & rsVote("Title") & "</font><br>"
if rsVote("VoteType")="Single" then
for i=1 to 8
if trim(rsVote("Select" & i) & "")="" then exit for
response.Write "<input type='radio' name='VoteOption' value='" & i & "'>" & rsVote("Select" & i) & "<br>"
next
else
for i=1 to 8
if trim(rsVote("Select" & i) & "")="" then exit for
response.Write "<input type='checkbox' name='VoteOption' value='" & i & "'>" & rsVote("Select" & i) & "<br>"
next
end if
response.write "<br><input name='VoteType' type='hidden'value='" & rsVote("VoteType") & "'>"
response.write "<input name='Action' type='hidden' value='Vote'>"
response.write "<input name='ID' type='hidden' value='" & rsVote("ID") & "'>"
response.write "<div align='center'>"
response.write "<a href='javascript:VoteForm.submit();'><img src='images/voteSubmit.jpg' width='47' height='19' border='0'></a>  "
response.write "<a href='Vote.asp?Action=Show' target='_blank'><img src='images/voteView.jpg' width='47' height='19' border='0'></a>"
response.write "</div></td></form></table>"
end if
rsVote.close
set rsVote=nothing
end sub


问题是:在首页上调用<% call showvote() %>,能够正常显示,但是点击
img src='images/voteSubmit.jpg' width='47' height='19' border='0'>图片,提示:网页上有错误!察看投票结果,没有改变。
怎么回事?
...全文
88 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
winlmh 2005-06-20
  • 打赏
  • 举报
回复
暈,代碼這麼亂
lnboy1003 2005-06-20
  • 打赏
  • 举报
回复
是不是因为你把他们写到了一个过程里,如果是用call调用能够正常读取程序,可是如果你直接按提交并没有调用过程所以出错啊
Anajian 2005-06-20
  • 打赏
  • 举报
回复
?
yuliang0828 2005-06-19
  • 打赏
  • 举报
回复
如果没猜错的话又是良精集团的后台吧
richwong 2005-06-19
  • 打赏
  • 举报
回复
'javascript:VoteForm.submit();

JS提交。应含有此函数才是,或者修改POST提交

28,406

社区成员

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

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