I have written the following query which functions exactly as I have planned:
<cfquery name="myquery" datasource="abc">
SELECT DISTINCT Right((Format([vDatum],"yyyy")),2) AS DDate
FROM tVCal RIGHT JOIN tVEvents ON tVCal.VItem = tVEvents.EvDate
</cfquery>
Every time this query is run, it outputs a series of two digit year numbers corresponding to years between 1940 and 2039, for which data is available in the database, for example: 00,04,15,28,42,56,58,75,89
Then I have a non-varying list of all year numbers from (19)40 to (20)39 arranged in tabular form, with the first decade looking like this:
<tr><td>40</td><td>41</td><td>42</td><td>43</td><td>44</td><td>45</td><td>46</td><td>47</td><td>48</td><td>49</td>
</tr>
Every time this table is displayed and the document is ready, I need a CF or jQuery function which will format all of the year numbers red which were also contained in the output from the original query.
Ten years ago I might have been able to write this myself, but I will be 80 this year and my head swims whenever I try something new. And if I am in the wrong place here, I would be grateful for a hint on where to go. Frank