afstemning
Hvordan kan jeg få denne afstemning til at vise resultatet hele tiden på min forside.Dette script ligger i en undermappe og det viser først resultatet når man har stemt.
<html>
<head>
<link rel=\"StyleSheet\" HREF=\"surveyadmin.css\" type=\"text/css\">
<title>Survey</title>
<script>function open_window(url)
{
mywin = window.open(url,\"window\",\'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=250,height=250\');
}
</script>
</head>
<body bgcolor=\"#ffe4b5\">
<%
\' Thanks to Tom Holder, who developed the IP restriction,
\' \"additional information\" extension and ported graphical
\' display for visitors.
\' Visit his site at http://www.ymonda.co.uk/ for more
\' ASP source code and products.
lAnketID = request(\"ID\")
set conn = Server.CreateObject(\"ADODB.Connection\")
Set rs = Server.CreateObject(\"ADODB.Recordset\")
conn.open sConnAnket
set rs.ActiveConnection = conn
rs.CursorType = adOpenStatic
sSQL = \"SELECT SurveyID, SurveyName, SurveyQuestion FROM Surveys WHERE SurveyID = \" & lAnketID
rs.Open sSQL, , , adCmdTable
if rs.eof or rs.bof then
response.write \"Error : Survey not found<br>Survey ID:\" & lAnketID
response.end
end if
sSurveyName = rs(\"SurveyName\")
sSurveyQuestion = rs(\"SurveyQuestion\")
rs.close
%>
<form action=\"cast.asp?ID=<%=lAnketID%>\" method=\"post\">
<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" width=\"100%\" bgcolor=\"#ffe4b5\">
<tr>
<td class=\"header2\"><%=sSurveyQuestion%></td>
</tr>
<%
sSQL = \"SELECT OptionID, OptionText, AdditionalInformation FROM Options WHERE SurveyID = \" & lAnketID
rs.Open sSQL, , , adCmdTable
do while not rs.eof
%>
<tr>
<td class=\"smalltext\">
<input type=\"radio\" name=\"optSecenek\" value=\"<%=rs(\"OptionID\")%>\">
<%If rs(\"AdditionalInformation\") <> \"\" then%>
<a href=\"java script:open_window(\'additionalinfo.asp?id=<%=rs(\"OptionID\")%>&name=<%=Server.URLEncode(rs(\"OptionText\"))%>\')\"><%=rs(\"OptionText\")%></a>
<%Else%>
<%=rs(\"OptionText\")%>
<%End If%>
</td>
</tr>
<%
rs.movenext
loop
rs.close
%>
<tr>
<td align=right><input type=\"submit\" name=\"cmdOyVer\" value=\" Send \" class=\"flatbutton\">
</td>
</tr>
</table>
</form>
