Código PHP:
<script type="text/javascript">
<!--
var months = ["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","novembre","Desembre"];
var daycounts = [31,28,31,30,31,30,31,31,30,31,30,31]; //for leap years, remember to set february to 29 days
// comensament de dies del 2006
var firstdays = [6,2,2,5,0,3,5,1,4,6,2,4];
//2004 firstdays = [3,6,7,3,5,1,3,6,2,4,0,2];
// This is where you put in the appointments. follow pattern [fromday,frommonth,today,tomonth,message]
var apps = [
//[15,3,13,4,"això ha de sortir al març i al abril"],
//[12,6,12,6,"my birthday"],
//[28,8,2,9,"Proba en el calendari"],
//[22,11,22,11,"Party with colleagues"],
[2,6,2,6,"És el meu aniversari no va el salt de linea"],
[1,1,1,1,"és cap d´any"]
];
function CheckDate(month,dayno)
{
var retval = new String(dayno);
var m = month + 1;
for(var app = 0; app < apps.length; app++)
{
if(m == apps[app][1] ) //first month
{
if(apps[app][3] - apps[app][1] > 0)
{
if(dayno >= apps[app][0])
{
retval = "<div class='hol' title='" + apps[app][4] + "'><a href=http://esigual.com onmouseover=jshelp.click(this, helpsample1, botleft) onmouseout=jshelp.hide(this)>" + dayno + "</a></div>";
//retval = "<div class='hol' onmouseover=jshelp.click(this, 'helpsample1', 'botleft'); onclick=jshelp.click(this, 'helpsample1', 'botleft'); onmouseout=jshelp.hide(this) title='" + apps[app][4] + " '>" + dayno + "</div>";
}
}
else
{
if(dayno >= apps[app][0] && dayno <= apps[app][2])
{
retval = "<div class='hol' title='" + apps[app][4] + "'><a href=http://esigual.com onmouseover=jshelp.click(this, helpsample1, botleft) onmouseout=jshelp.hide(this)>" + dayno + "</a></div>";
}
}
}
else if(m == apps[app][3]) // second month
{
if(dayno <= apps[app][2])
{
retval = "<div class='hol' title='" + apps[app][4] + "'><a href=http://esigual.com onmouseover=jshelp.click(this, helpsample1, botleft) onmouseout=jshelp.hide(this)>" + dayno + "</a></div>";
}
}
else if( m > apps[app][1] && m < apps[app][3] )
{
retval = "<div class='hol' title='" + apps[app][4] + "'><a href=http://esigual.com onmouseover=jshelp.click(this, helpsample1, botleft) onmouseout=jshelp.hide(this)>" + dayno + "</a></div>";
}
}
return retval;
}
function PrintMonth(month)
{
var done = false;
var day = 0;
document.write("<table class='inner'><caption><b><span class='textmes'>" + months[month] + "</span></b></caption><thead>");
document.write("<th><span class='textmes'>Dil</span></th><th><span class='textmes'>Dim</span></th><th><span class='textmes'>Dic</span></th><th><span class='textmes'>Dij</span></th><th><span class='textmes'>Div</span></th><th><span class='textmes'>Dis</span></th><th><span class='textmes'>Diu</span></th></thead>");
while(!done)
{
document.write("<tr>");
PrintWeek(month,day, firstdays[month], daycounts[month]);
document.write("</tr>");
day = day + 7;
if( day > daycounts[month] + firstdays[month])
{
done = true;
}
}
document.write("</tbody></table><p>");
}
function PrintWeek(monthno,start,min,max)
{
var d;
var desc;
for(var j = 0; j < 7; j++)
{
document.write("<td>");
d = start + j;
if(d >= min && d < max + min)
{
desc = CheckDate(monthno,d - min + 1);
document.write(desc);
}
document.write("</td>");
}
}
//-->
</script>
y la parte
Código PHP:
retval = "<div class='hol' title='" + apps[app][4] + "'><a href=http://esigual.com onmouseover=jshelp.click(this, helpsample1, botleft) onmouseout=jshelp.hide(this)>" + dayno + "</a></div>";
alguien tiene idea de por que no me funciona
pueden