Visualizzazione dei risultati da 1 a 4 su 4

Discussione: Calendario perpetuo

  1. #1
    Utente di HTML.it
    Registrato dal
    Mar 2005
    Messaggi
    5

    Calendario perpetuo.Aiuto!

    Ciao a tutti! Vorrei inserire nel mio sito un calendarietto perpetuo con tanto di grasica fatta da me. Che problema c'e'??il problema e'non ho idea di dove sbagli, comunque mi appare solo lo sfondo, e del calendario nemmeno l'ombra...
    codice:
    <table border="0" cellspacing="0" cellpadding="0" width="139" height="226" background="url del calendario" style="border-collapse: collapse">
    <tr>  <td height="106" width="125">
     <td colspan="90" height="106" width="118"> 
     </td>
    </tr><tr><td width="90" height="90">
      
    
    </p>
      
    
    
    
      
    
      
    
      
    
      
    
     </td>
      <td align="center" valign="top" width="92" height="58">
    <SCRIPT language="JavaScript">
    
    <!--//Begin
    monthnames = new Array(
    "Gennaio",
    "Febbraio",
    "Marzo",
    "Aprile",
    "Maggio",
    "Giugno",
    "Luglio",
    "Agosto",
    "Settembre",
    "Ottobre",
    "Novembre",
    "Dicembre");
    var linkcount=0;
    function addlink(month, day, href) {
    var entry = new Array(3);
    entry[0] = month;
    entry[1] = day;
    entry[2] = href;
    this[linkcount++] = entry;
    }
    Array.prototype.addlink = addlink;
    linkdays = new Array();
    monthdays = new Array(12);
    monthdays[0]=31;
    monthdays[1]=28;
    monthdays[2]=31;
    monthdays[3]=30;
    monthdays[4]=31;
    monthdays[5]=30;
    monthdays[6]=31;
    monthdays[7]=31;
    monthdays[8]=30;
    monthdays[9]=31;
    monthdays[10]=30;
    monthdays[11]=31;
    todayDate=new Date();
    thisday=todayDate.getDay();
    thismonth=todayDate.getMonth();
    thisdate=todayDate.getDate();
    thisyear=todayDate.getYear();
    thisyear = thisyear % 100;
    thisyear = ((thisyear < 50) ? (2000 + thisyear) : (1900 + thisyear));
    if (((thisyear % 4 == 0) 
    && !(thisyear % 100 == 0))
    ||(thisyear % 400 == 0)) monthdays[1]++;
    startspaces=thisdate;
    while (startspaces > 7) startspaces-=7;
    startspaces = thisday - startspaces + 1;
    if (startspaces < 0) startspaces+=7;
    document.write("<FONT face='Arial'>");
    document.write("<table border=0 " );
    document.write("style='font-size : 9px; color : #000000;' cellpadding=0 cellspacing=1>");
    
    document.write("<tr><td colspan=7><center>" 
    + monthnames[thismonth] + " " + thisyear 
    + "</center></td></tr>");
    document.write("<tr>");
    document.write("<td align=center><font color=#800000>D</td>");
    document.write("<td align=center><font color=#800000>L</td>");
    document.write("<td align=center><font color=#800000>M</td>")
    document.write("<td align=center><font color=#800000>M</td>");
    document.write("<td align=center><font color=#800000>G</td>");
    document.write("<td align=center><font color=#800000>V</td>");
    document.write("<td align=center><font color=#800000>S</td>");
    document.write("</tr>");
    document.write("<tr>");
    for (s=0;s<startspaces;s++) {
    document.write("<td>-</td>");
    }
    count=1;
    while (count <= monthdays[thismonth]) {
    for (b = startspaces;b<7;b++) {
    linktrue=false;
    document.write("<td>");
    for (c=0;c<linkdays.length;c++) {
    if (linkdays[c] != null) {
    if ((linkdays[c][0]==thismonth + 1) && (linkdays[c][1]==count)) {
    document.write("<a href=\"" + linkdays[c][2] + "\">");
    linktrue=true;
    }
    }
    }
    if (count==thisdate) {
    document.write("<font color='#800000'>");
    }
    if (count <= monthdays[thismonth]) {
    document.write(count);
    }
    else {
    document.write(" ");
    }
    if (count==thisdate) {
    document.write("</font>");
    }
    if (linktrue)
    document.write("</a>");
    document.write("</td>");
    count++;
    }
    document.write("</tr>");
    document.write("<tr>");
    startspaces=0;
    }
    document.write("</table>");
    document.write("</FONT>");
    </SCRIPT></td><td width="1" height="121"></td>
                <td width="3" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="2" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="3" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="1" height="121"></td>
                <td width="3" height="121"></td>
                <td width="116" height="121"></td>
    
    </tr></table>
    </font></a></font></p></center>
    qualcuno mi puo' aiutare??

  2. #2
    bhe, incollando il codice che hai postato, a me il calendario si vede benissimo. Un po piccolo forse, ma si fede.

    Dov'e' il problema ?
    Nulla è impossibile. Il difficile è trovare la soluzione che renda l'impossibile possibile...
    http://www.eternaldream.it

  3. #3
    Moderatore di JavaScript L'avatar di br1
    Registrato dal
    Jul 1999
    Messaggi
    19,998

    Re: Calendario perpetuo.Aiuto!

    I commenti al codice sono in formato html anziche' js... aggiungi:

    document.write("<font color='#800000'>"); //

    ciao
    Il guaio per i poveri computers e' che sono gli uomini a comandarli.

    Attenzione ai titoli delle discussioni: (ri)leggete il regolamento
    Consultate la discussione in rilievo: script / discussioni utili
    Usate la funzione di Ricerca del Forum

  4. #4
    Utente di HTML.it
    Registrato dal
    Mar 2005
    Messaggi
    5
    grazie mille!!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.