Ledevin
12-22-2002, 10:20 PM
First of all, let me say that I been looking for a board like for a while and that I am glad that I did find this one.
Ok, my problem is this. The user select a region (geographic) and is then taken to the region's main page, which is database driven. On the page he can view a lot of info (members, maps...). I then have a link that will direct him to a calendar of activities. When he get to the page the first time (calendar.asp) the page checks for the date and the region and writes it with a repeat region(asp).
This works, but if the user clicks on a date in the calendar, which is link to itself (calendar.asp?date=) it doesn't take the region code and it display all the events of all the regions for that date.
I try to attach a second value to the link (calendar.asp?date= &dtoday"®ion=) but it doesn't work.
Any help will be great. Here is my code for the calendar. I'm using an Access Database and Ultradev.
dToday = CDate(intThisMonth & "/" & intPrintDay & "/" & intThisYear)
If NOT Rs.EOF Then
' Set events flag to false. This means the day has no event in it
bEvents = False
Do While NOT Rs.EOF AND bEvents = False
' If the date falls within the range of dates in the recordset, then
' the day has an event. Make the events flag True
If dToday >= Rs("datein") AND dToday <= Rs("dateout") Then
' Print the date in a highlighted font
Write_TD "<A HREF=events.asp?date="& Server.URLEncode(dToday) & " CLASS='EVENT' TARGET='rightframe'> " & intPrintDay & "</A>", "HL"
bEvents = True
' If the Start date is greater than the date itself, there is no point
' checking other records. Exit the loop
ElseIf dToday < Rs("datein") Then
Exit Do
' Move to the next record
Else
Rs.MoveNext
End If
Loop
' Checks for that day
Rs.MoveFirst
End If
' If the event flag is not raise for that day, print it in a plain font
If bEvents = False Then
Write_TD "<A HREF=events.asp?date="& Server.URLEncode(dToday) & " CLASS='NOEVENT' TARGET='rightframe'> " & intPrintDay & "</A>", "SOME"
End If
End If
' Increment the date. Done once in the loop.
intPrintDay = intPrintDay + 1
End If
Ok, my problem is this. The user select a region (geographic) and is then taken to the region's main page, which is database driven. On the page he can view a lot of info (members, maps...). I then have a link that will direct him to a calendar of activities. When he get to the page the first time (calendar.asp) the page checks for the date and the region and writes it with a repeat region(asp).
This works, but if the user clicks on a date in the calendar, which is link to itself (calendar.asp?date=) it doesn't take the region code and it display all the events of all the regions for that date.
I try to attach a second value to the link (calendar.asp?date= &dtoday"®ion=) but it doesn't work.
Any help will be great. Here is my code for the calendar. I'm using an Access Database and Ultradev.
dToday = CDate(intThisMonth & "/" & intPrintDay & "/" & intThisYear)
If NOT Rs.EOF Then
' Set events flag to false. This means the day has no event in it
bEvents = False
Do While NOT Rs.EOF AND bEvents = False
' If the date falls within the range of dates in the recordset, then
' the day has an event. Make the events flag True
If dToday >= Rs("datein") AND dToday <= Rs("dateout") Then
' Print the date in a highlighted font
Write_TD "<A HREF=events.asp?date="& Server.URLEncode(dToday) & " CLASS='EVENT' TARGET='rightframe'> " & intPrintDay & "</A>", "HL"
bEvents = True
' If the Start date is greater than the date itself, there is no point
' checking other records. Exit the loop
ElseIf dToday < Rs("datein") Then
Exit Do
' Move to the next record
Else
Rs.MoveNext
End If
Loop
' Checks for that day
Rs.MoveFirst
End If
' If the event flag is not raise for that day, print it in a plain font
If bEvents = False Then
Write_TD "<A HREF=events.asp?date="& Server.URLEncode(dToday) & " CLASS='NOEVENT' TARGET='rightframe'> " & intPrintDay & "</A>", "SOME"
End If
End If
' Increment the date. Done once in the loop.
intPrintDay = intPrintDay + 1
End If