Foros del Web » Programando para Internet » Javascript »

ya tengo el calendario anual

Estas en el tema de ya tengo el calendario anual en el foro de Javascript en Foros del Web. hola ya he conseguido el calendario anual el codigo es este Código PHP: <%@ LANGUAGE = "VBSCRIPT"  CODEPAGE = "1252" %> <! DOCTYPE HTML  PUBLIC  "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" ...
  #1 (permalink)  
Antiguo 21/12/2005, 03:34
Avatar de engonga
Usuario no validado
 
Fecha de Ingreso: marzo-2002
Ubicación: Buenos Aires
Mensajes: 1.300
Antigüedad: 22 años, 1 mes
Puntos: 8
ya tengo el calendario anual

hola ya he conseguido el calendario anual

el codigo es este

Código PHP:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<
html>
<!-- 
TWO STEPS TO INSTALL ANNUAL CALENDAR WITH EVENTS:
 
  
1.  Copy the coding into the HEAD of your HTML document
  2.  Add the last code into the BODY of your HTML document  
-->
 
<!-- 
STEP ONEPaste this code into the HEAD of your HTML document  -->
 
<
HEAD>
 
<!-- 
This script and many more are available free online at -->
<!-- 
The JavaScript Source!! http://javascript.internet.com -->
 
 
<style type="text/css">
 
body {
   
background-color #cccccc;
   
}
div.hol {
   
background-color #ffffff;
   
cursor:pointer;
   }
td.outer {
   
cellpadding 1en;
   
border solid #666666;
   
}
 
table.inner {
   
background-color #999999;
   
font-size 8pt;
   }
.
textmes {
 
font-familyVerdanaArialHelveticasans-serif;
 
color#000000;
 
text-decorationnone;
}
.
dia {
 
font-familyVerdanaArialHelveticasans-serif;
 
color#000000;
 
text-decorationnone;
}
DIV.divhelp {
 
BORDER-RIGHTblack 1px solidPADDING-RIGHT4pxBORDER-TOPblack 1px solidPADDING-LEFT4pxVISIBILITYhiddenPADDING-BOTTOM4pxBORDER-LEFTblack 1px solidPADDING-TOP4pxBORDER-BOTTOMblack 1px solidPOSITIONabsoluteBACKGROUND-COLOR#ffffff
}
DIV#helpsample1 {
 
WIDTH100px
 
}
</
style>
 
<
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"],
[
1,1,1,1,"és cap d´any"]
];
 
 
 
function 
CheckDate(month,dayno)
{
   var 
retval = new String(dayno);
   var 
month 1;
   
   for(var 
app 0app apps.lengthapp++)
   {
      if(
== 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] + "'>" dayno "</div>";
    
            }
         }
         else
         {
            if(
dayno >= apps[app][0] && dayno <= apps[app][2])
            {
               
      
retval "<div class='hol' title='" apps[app][4] + "'>" dayno "</div>";
    
            }
         }
      }
      else if(
== apps[app][3]) // second month
      
{
         if(
dayno <= apps[app][2])
         {
            
   
retval "<div class='hol' title='" apps[app][4] + "'>" dayno "</div>";
   
         }
      }
      else if( 
apps[app][1] && apps[app][3] )
      {    
         
retval "<div class='hol' title='" apps[app][4] + "'>" dayno "</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,dayfirstdays[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 
07j++)
   {
      
document.write("<td>");
      
start j;
      if(
>= min && max min)
      {
         
desc CheckDate(monthno,min 1);
         
document.write(desc);
      }
      
document.write("</td>");
   }
}
</script>
</HEAD>
 
<!-- STEP TWO: Copy this code into the BODY of your HTML document  -->
 
<BODY jshelp.init()>
<DIV class=divhelp id=helpsample1><b>prova exemple 1</b><br>Això es la prova per mostrar<br> coses al calendari</b></DIV>
 
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
 
<center><h1>calendari 20<span class="Estilo1">05</span></h1>
</center>

Passa el ratolí per sobre per veure les activitats
 
<table>
<tr>
<td class="outer">
<script type="text/javascript">
PrintMonth(0);
</script>
</td>
<td class="outer">
<script type="text/javascript">
PrintMonth(1);
</script>
</td>
<td class="outer">
<script type="text/javascript">
PrintMonth(2);
</script>
</td>
</tr>
<tr>
<td class="outer">
<script type="text/javascript">
PrintMonth(3);
</script>
</td>
<td class="outer">
<script type="text/javascript">
PrintMonth(4);
</script>
</td>
<td class="outer">
<script type="text/javascript">
PrintMonth(5);
</script>
</td>
</tr>
<tr>
<td class="outer">
<script type="text/javascript">
PrintMonth(6);
</script>
</td>
<td class="outer">
<script type="text/javascript">
PrintMonth(7);
</script>
</td>
<td class="outer">
<script type="text/javascript">
PrintMonth(8);
</script>
</td>
</tr>
<tr>
<td class="outer">
<script type="text/javascript">
PrintMonth(9);
</script>
</td>
<td class="outer">
<script type="text/javascript">
PrintMonth(10);
</script>
</td>
<td class="outer">
<script type="text/javascript">
PrintMonth(11);
</script>
</td>
</tr>
</table>
 
 

<!-- Script Size:  5.48 KB -->
 
 
 
 
 
<body>
</body>
</html> 

pero lo que passa es que ahora tengo un problema
puedo poner un comentario en los dias que yo quiera pero lo hago de esta manera

Código PHP:
     retval "<div class='hol' title='" apps[app][4] + "'>" dayno "</div>"
y el title en una DIv no se ve en algunos navegadores

he intentado hacerlo con mouse Over llamando otra funciona de otro script pero no me funcion

y no se como hacer para que quando pasen el raton por encima del dia señalado me salga un glovo con lo que yo quiera que salgam, mas bien lo que esta en apps[app][4]

alguien me puede hecar un cable?

gracias
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 08:51.