salut,
Autre manière de faire,
<code>
<cfset title="-[ Calendar ]-"><!--- Texte du titre --->
<cfset BgColor="64aaDC"><!--- Couleur de fond de page --->
<cfset bgcarac="aaa4DC"><!--- Couleur de fond de page --->
<cfset BgMenu="64aaDC"><!--- Couleur de fond pour la selection du mois et de l annee --->
<cfset BgDayAlpha="0066aa"><!--- Couleur de fond des jours en lettre --->
<cfset BgDayNumb="CCCCCC"><!--- Couleur de fond des jours en chiffre --->
<cfset WCase="30"><!--- Largeur de la case --->
<cfset HCase="30"><!--- Hauteur de la case --->
<cfloop index="ind" from="1" to="12" step="1">
<cfparam name="dateOnClick" default="#Now()#"><!--- Date du jour, elle sera utiliser pour faire des calculs --->
<cfparam name="Currentdate" default="#Now()#"><!--- Date du jour --->
<cfset Jour=0>
<cfset dateOnClick=#Dateadd('m',-#Month(dateOnClick)#+#ind#, dateOnClick)#>
<cfset Mois=#Month(Currentdate)#><!--- Le mois de la date du jour --->
<cfset Annee=#Year(Currentdate)#><!--- Le annee de la date du jour --->
<cfset J1=DayofWeek("#Month(dateOnClick)#/01/#Year(dateOnClick)#")>
<cfset NBJ=DaysInMonth(dateOnClick)> <!--- Nombre de Jour --->
<cfoutput>
<html>
<head>
<title>#title#</title>
<style>
A:visited { color: FFFFFF; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none }
A:hover { color: 33AA55; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none }
A:link { color: FFFFFF; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none }
A:active { color: 33AA55; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none }
.currentday { color: FF0000; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none }
.currentday:visited { color: FF0000; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none }
.currentday:hover { color: 33AA55; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none }
.currentday:link { color: FF0000; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none }
.currentday:active { color: 33AA55; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none }
.content { color: FFFFFF; font-size: 9pt; font-family: Verdana; font-weight : bold; text-decoration: none }
</style>
<script>
function dayClick() {
alert('#month(dateOnClick)#-#Jour#-#year(dateOnClick)#');
}
</script>
</head>
<body bgcolor="#BgColor#">
<table border="0" cellspacing="0" cellpadding="0" align="CENTER">
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="content" bgcolor="#BgMenu#">
<tr>
<td width="10" height="20" align="center" valign="middle" class="content" bgcolor="#BgMenu#"><a href="popup.cfm?dateOnClick=#Dateadd('m', -1, dateOnClick)#"><<</a></a></td>
<td width="50" height="20" align="center" valign="middle" class="content" bgcolor="#BgMenu#"><b>#MonthasString(Month(dateOnClick))#</b></td>
<td width="10" height="20" align="center" valign="middle" class="content" bgcolor="#BgMenu#"><a href="popup.cfm?dateOnClick=#Dateadd('m', 1, dateOnClick)#">>></a></td>
<td width="28" height="20" align="center" valign="middle" class="content" bgcolor="#BgMenu#"> </td>
<td width="10" height="20" align="center" valign="middle" class="content" bgcolor="#BgMenu#"><a href="popup.cfm?dateOnClick=#Dateadd('yyyy', -1, dateOnClick)#"><<</a></td>
<td width="50" height="20" align="center" valign="middle" class="content" bgcolor="#BgMenu#"><b>#Year(dateOnClick)#</b></td>
<td width="10" height="20" align="center" valign="middle" class="content" bgcolor="#BgMenu#"><a href="popup.cfm?dateOnClick=#Dateadd('yyyy', 1, dateOnClick)#">>></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="1" cellspacing="0" cellpadding="0" align="CENTER" bgcolor="#BgDayAlpha#" class="currentday">
<tr>
<td width="#WCase#" height="#HCase#" align="center" valign="middle" class="content">Di</td>
<td width="#WCase#" height="#HCase#" align="center" valign="middle" class="content">Lu</td>
<td width="#WCase#" height="#HCase#" align="center" valign="middle" class="content">Ma</td>
<td width="#WCase#" height="#HCase#" align="center" valign="middle" class="content">Me</td>
<td width="#WCase#" height="#HCase#" align="center" valign="middle" class="content">Je</td>
<td width="#WCase#" height="#HCase#" align="center" valign="middle" class="content">Ve</td>
<td width="#WCase#" height="#HCase#" align="center" valign="middle" class="content">Sa</td>
</tr>
<cfloop index="j" from="1" to="6" step="1">
<tr>
<cfset BgDayNumb="aaaaaa">
<cfloop index="i" from="1" to="7" step="1">
<td width="#WCase#" height="#HCase#" align="center" valign="middle" bgcolor="#BgDayNumb#">
<cfif (i eq J1) and (j eq 1) or (Jour GTE 1) and (Jour LT NbJ)>
<cfset Jour=Jour+1>
<cfif (Jour EQ Day(dateOnClick)) and (Mois EQ month(dateOnClick)) and (Annee EQ year(dateOnClick))>
<B><a class="currentday" href="##" onClick="javascript:window.alert('Le #Jour# \ndu #month(dateOnClick)#\nEn l an #year(dateOnClick)#');">#Jour#</a></B>
<cfelse>
<B><a href="##" onClick="javascript:window.alert('Le #Jour# \ndu #month(dateOnClick)#\nEn l an #year(dateOnClick)#');">#Jour#</a></B>
</cfif>
<cfelse>
</cfif>
</td>
<cfset BgDayNumb="cccccc">
</cfloop>
</tr>
</cfloop>
</table>
</td>
</tr>
</table>
</body>
</html>
</cfoutput>
</cfloop>
</code>