投票系统的过程编写:不知错在哪里?
过程代码:
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'>图片,提示:网页上有错误!察看投票结果,没有改变。
怎么回事?