I have a page with 7 checkboxes, one for each day of the week. To avoid having a session variable for each day of the week that I need to check for on or off I have each checkbox named "NOTWORK" and the value is (M,T,W,TH,F,SA,SU) so if someone checks Monday Wednesday and Friday the value of Session("NotWork"
is equal to M,W,F.
I need a way to loop through this string so that if the user comes back to this page the checkboxes will be checked.
In Each checkbox I have the following:
<%NotWorkCheck("M"
%> where M would be in Monday, T in Tuesday....
and the function NotWorkCheck is as follows:
Function NotWorkCheck(Day)
dim arrDays(7),x
arrDays=Session("NotWork"
for x = 1 to 7
if arrDays(x) = Day then respose.write(" checked"
Next
End Function
The page is erroring when it attempts to assign Session("NotWork"
to arrDays giving a type mismatch error.
Is there a way to do this or should I go back to 7 variables for each day?
I need a way to loop through this string so that if the user comes back to this page the checkboxes will be checked.
In Each checkbox I have the following:
<%NotWorkCheck("M"
and the function NotWorkCheck is as follows:
Function NotWorkCheck(Day)
dim arrDays(7),x
arrDays=Session("NotWork"
for x = 1 to 7
if arrDays(x) = Day then respose.write(" checked"
Next
End Function
The page is erroring when it attempts to assign Session("NotWork"
Is there a way to do this or should I go back to 7 variables for each day?