A
angus
Hi, guys, I am trying to build an event calendar using asp, i want to
display a redot whenever there is an event on that day.
i built the ms access database so that one day can have more than one event.
say when there is more than one event on 15th, all the red dots after the
dates 15th are disappeared. which means my program only allow one day one
event, otherwise, red dot won't be displayed correctly.
The below is the part of the arrary to display redot
do until rs.EOF
if intCount > 31 then exit do
if Day(rs("dte")) = intCount + 1 then
dictDte(intCount, 1) = rs("redot")
rs.Movenext
else
dictDte(intCount, 1) = " "
End If
dictDte(intCount, 2) = intCount + 1
intCount = intCount + 1
loop
heres the asp code to display the red dot,
Response.Write "<FONT FACE=""Arial"" SIZE=""-2"" COLOR=""" & sFontColor &
""">"
Response.Write "<a href=calendar/view_day.asp?" & "view_date=" &
day(dtCurViewday) & "-" & monthname(month(dtCurViewday)) & "-" &
year(dtCurViewday) & " target=cwindow><div align=right valign=top>" &
Day(dtCurViewDay) & ""
Response.Write "" & formatStr(dictDte(Day(dtCurViewDay)- 1, 1)) & "</div>"
Response.Write "</a></FONT>"
display a redot whenever there is an event on that day.
i built the ms access database so that one day can have more than one event.
say when there is more than one event on 15th, all the red dots after the
dates 15th are disappeared. which means my program only allow one day one
event, otherwise, red dot won't be displayed correctly.
The below is the part of the arrary to display redot
do until rs.EOF
if intCount > 31 then exit do
if Day(rs("dte")) = intCount + 1 then
dictDte(intCount, 1) = rs("redot")
rs.Movenext
else
dictDte(intCount, 1) = " "
End If
dictDte(intCount, 2) = intCount + 1
intCount = intCount + 1
loop
heres the asp code to display the red dot,
Response.Write "<FONT FACE=""Arial"" SIZE=""-2"" COLOR=""" & sFontColor &
""">"
Response.Write "<a href=calendar/view_day.asp?" & "view_date=" &
day(dtCurViewday) & "-" & monthname(month(dtCurViewday)) & "-" &
year(dtCurViewday) & " target=cwindow><div align=right valign=top>" &
Day(dtCurViewDay) & ""
Response.Write "" & formatStr(dictDte(Day(dtCurViewDay)- 1, 1)) & "</div>"
Response.Write "</a></FONT>"