problem with checkboxes with submittion
Hi ,
i created 7 combo boxed - each of them should become checked and disabled on 'onclick' event. When i choose first checkbox it works fine , but each of the next clicks erases the last choice , so in each click i can see only one disabled selected checkbox - But i need it to remember all the choices . when i worked with Asp.NET there was a thing called 'ViewState' - and this is what i need here , but i can't make it work . Here is the code i used :
do while not mainRs.EOF
if (mainRs(30) <> "" and mainRs(29) <> "") then
if (( ( day(Date())<day(mainRs(29)) and month(Date())<=month(mainRs(29)) ) or ( (day(Date()) >= day(mainRs(29)) ) and ( month(Date()) < month(mainRs(29)) ) ) ) or ( ((day(Date()) = day(mainRs(29)))and(month(Date()) = month(mainRs(29))))and((hour(Time())<hour(mainRs(3 0)))or((hour(Time()) = hour(mainRs(30)))and(minute(Time()) < minute(mainRs(30))))) ) ) then
firstTypeCounter = firstTypeCounter + 1
%>
<form id="frm<%=firstTypeCounter%>" method="post" action="game.asp?CatID=<%Response.Write(Request.Qu eryString("CatID"))%>&GameID=<%Response.Write(Requ est.QueryString("GameID"))%>&lang=<%Response.Write (Request.QueryString("lang"))%>">
<tr bgcolor="FCFAFA">
<td width="57" class="tdlineviewtablecellside211" dir="ltr"><% Response.Write(mainRs(29)) %></td>
<td width="3"><img height="1" src="../images/1x1.gif" width="1"></td>
<td width="66" class="tdlineviewtablecellside212" dir="ltr"><% Response.Write(mainRs(3+lang)) %></td>
<td colspan="2" class="tdlineviewtablecellside212">
<%
if(((cint(Minute(mainRs(30))) - cint(Minute(Time())) <= 10) ) and (cint(Hour(mainRs(30))) = cint(Hour(Time()))) and (cint(Day(Date())) = cint(Day(mainRs(29)))) and (cint(Month(Date())) = cint(Month(mainRs(29)))) ) then
%>
<img src="images/bullet.gif" width="10" height="10">
<%
end if
%>
</td>
<td width="36" align="left" class="tdlineviewtablecellside212"><div align="center">
<%
if (mainRs(7) <> "") then
%>
<%
' Response.Write("<script language='JavaScript'>alert('" & "checkbox" & Request.QueryString("CatID") & Request.QueryString("GameID") & mainRs(2) & "---" & Request.Form("checkbox" & Request.QueryString("CatID") & Request.QueryString("GameID") & mainRs(2)) & "');</script>")
%>
<input type="checkbox" name="checkbox<%=Request.QueryString("CatID")%><%= Request.QueryString("GameID")%><%=mainRs(2)%>1" value="1" onclick="SubmitForm('frm<%=firstTypeCounter%>');" <%if(Request.Form("checkbox" & Request.QueryString("CatID") & Request.QueryString("GameID") & mainRs(2) & "1")="1") then Response.Write("checked disabled") end if%>><input type="hidden" name="chkTypeID" value="1"><input type="hidden" name="chkGambleID" value="<%=mainRs(2)%>">
<%
end if
%>
</div></td>
<td width="54" class="tdlineviewtablecellside211" dir="ltr">
<%
if(isUS = "US") then
if (mainRs(7) <> "") then
if (cdbl(mainRs(7)) >= 2) then
Response.Write(cint(((cdbl(mainRs(7)))-1)*100))
elseif (cdbl(mainRs(7)) < 2 and cdbl(mainRs(7)) > 1) then
Response.Write(cint((-100/((cdbl(mainRs(7)))-1))))
end if
else
Response.Write(mainRs(7))
end if
else
Response.Write(mainRs(7))
end if
%>
</td>
<td width="6"><img height="1" src="/10BetClient/images/1x1.gif" width="1"></td>
<td width="10" class="tdlineviewtablecellside212">
<% if (((cint(Minute(mainRs(30))) - cint(Minute(Time())) <= 10) ) and (cint(Hour(mainRs(30))) = cint(Hour(Time()))) and (cint(Day(Date())) = cint(Day(mainRs(29)))) and (cint(Month(Date())) = cint(Month(mainRs(29))) )) then %>
<img src="images/bullet.gif" width="10" height="10">
<% end if %>
</td>
<td width="36" align="left" class="tdlineviewtablecellside212"><div align="center">
<%
if(mainRs(8) <> "") then
%>
<%'Response.Write("<script language='JavaScript'>alert('" & firstTypeCounter & "');</script>")%>
<input type="checkbox" name="checkbox<%=Request.QueryString("CatID")%><%= Request.QueryString("GameID")%><%=mainRs(2)%>2" value="1" onclick="SubmitForm('frm<%=firstTypeCounter%>');" <%if (Request.Form("checkbox" & Request.QueryString("CatID") & Request.QueryString("GameID") & mainRs(2) & "2" ) <> "") then Response.Write("checked disabled") end if%>><input type="hidden" name="chkTypeID" value="2"><input type="hidden" name="chkGambleID" value="<%=mainRs(2)%>">
<%
end if
%>
</div></td>
<td width="42" dir="ltr" class="tdlineviewtablecellside211"><% Response.Write(mainRs(15)) %></td>
<td width="54" class="tdlineviewtablecellside211" dir="ltr">
<%
if(isUS = "US") then
if (mainRs(8) <> "") then
if (cdbl(mainRs(8)) >= 2) then
Response.Write(cint(((cdbl(mainRs(8)))-1)*100))
elseif (cdbl(mainRs(8)) < 2 and cdbl(mainRs(8)) > 1) then
Response.Write(cint((-100/((cdbl(mainRs(8)))-1))))
end if
else
Response.Write(mainRs(8))
end if
else
Response.Write(mainRs(8))
end if
%>
</td>
<td width="6"><img height="1" src="/10BetClient/images/1x1.gif" width="1"></td>
<td width="10" class="tdlineviewtablecellside212">
<%
if (((cint(Minute(mainRs(30))) - cint(Minute(Time())) <= 10) ) and (cint(Hour(mainRs(30))) = cint(Hour(Time()))) and (cint(Day(Date())) = cint(Day(mainRs(29)))) and (cint(Month(Date())) = cint(Month(mainRs(29))) )) then
%>
<img src="images/bullet.gif" width="10" height="10">
<%
end if
%>
</td>
<td width="36" align="left" class="tdlineviewtablecellside212"><div align="center">
<%
if (mainRs(9) <> "") then
%>
<input type="checkbox" name="checkbox<%=Request.QueryString("CatID")%><%= Request.QueryString("GameID")%><%=mainRs(2)%>3" value="1" onclick="SubmitForm('frm<%=firstTypeCounter%>');" <% if (Request.Form("checkbox" & Request.QueryString("CatID") & Request.QueryString("GameID") & mainRs(2) & "3") = "1") then Response.Write("checked disabled") end if%>><input type="hidden" name="chkTypeID" value="3"><input type="hidden" name="chkGambleID" value="<%=mainRs(2)%>">
<%
end if
%>
........
|