Thread: Kalender

  1. #1
    Gregosz's Avatar
    Registered
    27/12/07
    Location
    Tielt
    Posts
    386
    iTrader
    8 (100%)
    Mentioned
    0 Post(s)

    Kalender

    Code:
    <script type="text/javascript" language="JavaScript">
    var d = document;
    monthnames = new Array(
    "januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december");
    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;
    d.write("<table border=2>");
    d.write("<tr><th colspan=7>" + monthnames[thismonth] + " " + thisyear + "</th></tr>");
    d.write("<tr>");
    d.write("<td align=center>Zo</td>");
    d.write("<td align=center>Ma</td>");
    d.write("<td align=center>Di</td>");
    d.write("<td align=center>Wo</td>");
    d.write("<td align=center>Do</td>");
    d.write("<td align=center>Vr</td>");
    d.write("<td align=center>Za</td>"); 
    d.write("</tr>");
    d.write("<tr>");
    for (s=0;s<startspaces;s++) {
    d.write("<td> </td>");
    }
    count=1;
    while (count <= monthdays[thismonth]) {
    for (b = startspaces;b<7;b++) {
    linktrue=false;
    d.write("<td align=right>");
    for (c=0;c<linkdays.length;c++) {
    if (linkdays[c] != null) {
    if ((linkdays[c][0]==thismonth + 1) && (linkdays[c][1]==count)) {
    d.write("<a href=\"" + linkdays[c][2] + "\">");
    linktrue=true;
          }
       }
    }
    if (count==thisdate) {
    d.write("<strong>");
    }
    if (count <= monthdays[thismonth]) {
    d.write(count);
    }
    else {
    d.write(" ");
    }
    if (count==thisdate) {
    d.write("</strong>");
    }
    if (linktrue)
    d.write("</a>");
    d.write("</td>");
    count++;
    }
    d.write("</tr>");
    d.write("<tr>");
    startspaces=0;
    }
    d.write("</table>");
    </script>
    Ik ben niet zo goed met Javascript. Nu heb ik al een scriptje gevonden voor een kalender. Maar de kalender zou zo moeten zijn dat enkel de volgende 10 dagen worden getoond.
    In this country, you gotta make the money first. Then when you get the money, you get the power. Then when you get the power, then you get the woman. - Scarface

    Followmy.TV
    no votes  

  2. #2
    adrianhates's Avatar
    Registered
    23/01/06
    Posts
    2,115
    iTrader
    0
    Mentioned
    0 Post(s)
    Reputation
    23/23
    Hier hebben we echt niets aan..

    Wat voor kalendar? Wil je een datepicker of een full calendar dat je op uw website wil laten zien om bvb events te tonen?

    Wees aub een beetje duidelijker..
    no votes  

  3. #3
    Gregosz's Avatar
    Registered
    27/12/07
    Location
    Tielt
    Posts
    386
    iTrader
    8 (100%)
    Mentioned
    0 Post(s)
    In this country, you gotta make the money first. Then when you get the money, you get the power. Then when you get the power, then you get the woman. - Scarface

    Followmy.TV
    no votes  

  4. #4
    woony's Avatar
    Registered
    03/12/03
    Location
    Oostende
    Posts
    2,599
    iTrader
    78 (100%)
    Mentioned
    0 Post(s)
    Reputation
    7/10
    waarom javascript?
    doe dat gewoon in uw scripting taal. loopje met addays tot aan 10. en haal per datum uw eventjes op?
    no votes  

  5. #5
    Gregosz's Avatar
    Registered
    27/12/07
    Location
    Tielt
    Posts
    386
    iTrader
    8 (100%)
    Mentioned
    0 Post(s)
    Nevermind. Heb het al kunnen oplossen.
    In this country, you gotta make the money first. Then when you get the money, you get the power. Then when you get the power, then you get the woman. - Scarface

    Followmy.TV
    no votes  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in