chrisna
Posts: 15
|
Posted: 01/10/2012, 11:18 PM |
|
All Codecharge Master
Please help me
I have read the post on : http://forums.codecharge.com/posts.php?post_id=97868&s_...=calendar+color
and put the html code on my page but i've got an error.
the code is
<!-- BEGIN Week -->
<tr>
<!-- BEGIN Day -->
<!-- BEGIN EventRow -->
<td BGCOLOR="#ff0000">{DayNumber1}
<div class="color='Red'>CalendarEvent">
{EventTime} - {EventDescription}
</div>
<div class="color='Red'>CalendarEvent">
</div>
<div class="color='Red'>CalendarEvent">
{sLabel}
</div>
</td>
<!-- END EventRow --> <!-- BEGIN NoEvents --><td {Style}>{DayNumber} </td><!-- END NoEvents --><!-- END Day -->
<!-- BEGIN EmptyDay -->
<td {Style}> </td><!-- END EmptyDay -->
</tr>
<!-- END Week -->
I need to change the background color of the cell on calendar to red when there is event X, then other cell to green when there is event Y. When there is noevent, the background color stay white.
Thank you in advance for your help, Master
|
|
|
TheunisP
Posts: 342
|
Posted: 01/10/2012, 11:41 PM |
|
you need to change the class or inline CSS of this line:
<td BGCOLOR="#ff0000">
1st the div only changes itself and its contents' style attributes so it is not applied to the whole TD cell
2nd the examples you refer to refers to using a lable and giving it a value during an event - you seem to have moved the code (non asp code) directly into the HTML that will never work from what I can figure out what you used of Walter's code
in actual fact skip everything look at W's post http://forums.codecharge.com/posts.php?post_id=97602&s_...=calendar+color
the logic is close to what you want - otherwise search in the ASP section for examples, for instance the one below where W and me had a look at it back in 2008
http://forums.codecharge.com/posts.php?post_id=97841&s_...ange+cell+color
|
|
|
chrisna
Posts: 15
|
Posted: 01/11/2012, 7:10 PM |
|
Thank you TheunisP for the response
I am following your guidance to use select case statament on hidden1 value
I have a question
I am using html syntax
<td bgcolor="{Hidden1}">{DayNumber}
and the background changes when there is an event .
But the CCS calendar style has been removed
How to use the {Style} word with my background color ?
I tried
<td {Style} bgcolor="{Hidden1}">{DayNumber}
and then the background color removed
Thank you, and sorry for my bad english
|
|
|
chrisna
Posts: 15
|
Posted: 01/11/2012, 9:37 PM |
|
Resolved !
Thank you
|
|
|
|