473,836 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding Events to Calendar

118 New Member
Hi,


I am desiging the calendar application for that purpose i used the below code. But it is for only displys calendar. And also i want to add the events to calendar. In that code displys the events when click on that date that perticular event displyed in a text box.But my requirement is to when click on that date that related event displyed in same td row not the text box. and also i add the events to that calendar.plz advice how to modify my code.



[HTML]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Calend ar of Events</title>
<style type="text/css">

#evtcal a:link {font: normal 12pt "Arial", "Helvetica" , "Sans Serif"; color: #004400; text-decoration: none;} /* unvisited link */
#evtcal a:visited {font: normal 12pt "Arial", "Helvetica" , "Sans Serif"; color: #004400; text-decoration: none;} /* visited link */
#evtcal a:hover {font: normal 12pt "Arial", "Helvetica" , "Sans Serif"; color: #004400; text-decoration: underline;} /* mouse over link */
#evtcal a:active {font: normal 12pt "Arial", "Helvetica" , "Sans Serif"; color: #004400; text-decoration: none;} /* selected link */

</style>

<script language="JavaS cript" type="text/javascript" src="events.js" ></script>

<script type="text/JavaScript" language="JavaS cript">

/* Preload images script */
var myimages=new Array()

function preloadimages() {
for (i=0;i<preloadi mages.arguments .length;i++){
myimages[i]=new Image();
myimages[i].src=preloadima ges.arguments[i];
}
}


/* The path of images to be preloaded inside parenthesis: (Extend list as desired.) */
preloadimages(" images/PrevYrOff40x40. jpg","images/PrevYrOn40x40.j pg","images/PrevMoOff40x40. jpg","images/PrevMoOn40x40.j pg","images/NextYrOff40x40. jpg","images/NextYrOn40x40.j pg","images/NextMoOff40x40. jpg","images/NextMoOn40x40.j pg");


/*************** *************** *************** *************** *************** ************
JavaScript Calendar - Digital Christian Design
//Script featured on and available at JavaScript Kit: http://www.javascriptk it.com
// Functions
changedate(): Moves to next or previous month or year, or current month depending on the button clicked.
createCalendar( ): Renders the calander into the page with links for each to fill the date form filds above.

*************** *************** *************** *************** *************** ************/

var thisDate = 1; // Tracks current date being written in calendar
var wordMonth = new Array("January" ,"February","Ma rch","April","M ay","June","Jul y","August","Se ptember","Octob er","November", "December") ;
var today = new Date(); // Date object to store the current date
var todaysDay = today.getDay() + 1; // Stores the current day number 1-7
var todaysDate = today.getDate() ; // Stores the current numeric date within the month
var todaysMonth = today.getUTCMon th() + 1; // Stores the current month 1-12
var todaysYear = today.getFullYe ar(); // Stores the current year
var monthNum = todaysMonth; // Tracks the current month being displayed
var yearNum = todaysYear; // Tracks the current year being displayed
var firstDate = new Date(String(mon thNum)+"/1/"+String(yearNu m)); // Object Storing the first day of the current month
var firstDay = firstDate.getUT CDay(); // Tracks the day number 1-7 of the first day of the current month
var lastDate = new Date(String(mon thNum+1)+"/0/"+String(yearNu m)); // Tracks the last date of the current month
var numbDays = 0;
var calendarString = "";
var eastermonth = 0;
var easterday = 0;


function changedate(butt onpressed) {
if (buttonpressed == "prevyr") yearNum--;
else if (buttonpressed == "nextyr") yearNum++;
else if (buttonpressed == "prevmo") monthNum--;
else if (buttonpressed == "nextmo") monthNum++;
else if (buttonpressed == "return") {
monthNum = todaysMonth;
yearNum = todaysYear;
}

if (monthNum == 0) {
monthNum = 12;
yearNum--;
}
else if (monthNum == 13) {
monthNum = 1;
yearNum++
}

lastDate = new Date(String(mon thNum+1)+"/0/"+String(yearNu m));
numbDays = lastDate.getDat e();
firstDate = new Date(String(mon thNum)+"/1/"+String(yearNu m));
firstDay = firstDate.getDa y() + 1;
createCalendar( );
return;
}


function easter(year) {
// feed in the year it returns the month and day of Easter using two GLOBAL variables: eastermonth and easterday
var a = year % 19;
var b = Math.floor(year/100);
var c = year % 100;
var d = Math.floor(b/4);
var e = b % 4;
var f = Math.floor((b+8 ) / 25);
var g = Math.floor((b-f+1) / 3);
var h = (19*a + b - d - g + 15) % 30;
var i = Math.floor(c/4);
var j = c % 4;
var k = (32 + 2*e + 2*i - h - j) % 7;
var m = Math.floor((a + 11*h + 22*k) / 451);
var month = Math.floor((h + k - 7*m + 114) / 31);
var day = ((h + k - 7*m +114) % 31) + 1;
eastermonth = month;
easterday = day;
}


function createCalendar( ) {
calendarString = '';
var daycounter = 0;
calendarString += '<table width="312" border="1" cellpadding="0" cellspacing="1" >';
calendarString += '<tr>';
calendarString += '<td align=\"center\ " valign=\"center \" width=\"40\" height=\"40\">< a href=\"#\" onMouseOver=\"d ocument.PrevYr. src=\'images\/PrevYrOn40x40\. jpg\';\" onMouseOut=\"do cument.PrevYr.s rc=\'images\/PrevYrOff40x40\ .jpg\';\" onClick=\"chang edate(\'prevyr\ ')\"><img name=\"PrevYr\" src=\"images\/PrevYrOff40x40\ .jpg\" width=\"40\" height=\"40\" border=\"0\" alt=\"Prev Yr\"\/><\/a><\/td>';
calendarString += '<td align=\"center\ " valign=\"center \" width=\"40\" height=\"40\">< a href=\"#\" onMouseOver=\"d ocument.PrevMo. src=\'images\/PrevMoOn40x40\. jpg\';\" onMouseOut=\"do cument.PrevMo.s rc=\'images\/PrevMoOff40x40\ .jpg\';\" onClick=\"chang edate(\'prevmo\ ')\"><img name=\"PrevMo\" src=\"images\/PrevMoOff40x40\ .jpg\" width=\"40\" height=\"40\" border=\"0\" alt=\"Prev Mo\"\/><\/a><\/td>';
calendarString += '<td bgcolor=\"#C8C8 96\" align=\"center\ " valign=\"center \" width=\"128\" height=\"40\" colspan=\"3\">< b>' + wordMonth[monthNum-1] + '&nbsp;&nbsp; ' + yearNum + '<\/b><\/td>';
calendarString += '<td align=\"center\ " valign=\"center \" width=\"40\" height=\"40\">< a href=\"#\" onMouseOver=\"d ocument.NextMo. src=\'images\/NextMoOn40x40\. jpg\';\" onMouseOut=\"do cument.NextMo.s rc=\'images\/NextMoOff40x40\ .jpg\';\" onClick=\"chang edate(\'nextmo\ ')\"><img name=\"NextMo\" src=\"images\/NextMoOff40x40\ .jpg\" width=\"40\" height=\"40\" border=\"0\" alt=\"Next Mo\"\/><\/a><\/td>';
calendarString += '<td align=\"center\ " valign=\"center \" width=\"40\" height=\"40\">< a href=\"#\" onMouseOver=\"d ocument.NextYr. src=\'images\/NextYrOn40x40\. jpg\';\" onMouseOut=\"do cument.NextYr.s rc=\'images\/NextYrOff40x40\ .jpg\';\" onClick=\"chang edate(\'nextyr\ ')\"><img name=\"NextYr\" src=\"images\/NextYrOff40x40\ .jpg\" width=\"40\" height=\"40\" border=\"0\" alt=\"Next Yr\"\/><\/a><\/td>';
calendarString += '<\/tr>';
calendarString += '<tr>';
calendarString += '<td bgcolor=\"#DDDD DD\" align=\"center\ " valign=\"center \" width=\"40\" height=\"22\">S un<\/td>';
calendarString += '<td bgcolor=\"#DDDD DD\" align=\"center\ " valign=\"center \" width=\"40\" height=\"22\">M on<\/td>';
calendarString += '<td bgcolor=\"#DDDD DD\" align=\"center\ " valign=\"center \" width=\"40\" height=\"22\">T ue<\/td>';
calendarString += '<td bgcolor=\"#DDDD DD\" align=\"center\ " valign=\"center \" width=\"40\" height=\"22\">W ed<\/td>';
calendarString += '<td bgcolor=\"#DDDD DD\" align=\"center\ " valign=\"center \" width=\"40\" height=\"22\">T hu<\/td>';
calendarString += '<td bgcolor=\"#DDDD DD\" align=\"center\ " valign=\"center \" width=\"40\" height=\"22\">F ri<\/td>';
calendarString += '<td bgcolor=\"#DDDD DD\" align=\"center\ " valign=\"center \" width=\"40\" height=\"22\">S at<\/td>';
calendarString += '<\/tr>';

thisDate == 1;

for (var i = 1; i <= 6; i++) {
calendarString += '<tr>';
for (var x = 1; x <= 7; x++) {
daycounter = (thisDate - firstDay)+1;
thisDate++;
if ((daycounter > numbDays) || (daycounter < 1)) {
calendarString += '<td align=\"center\ " bgcolor=\"#8888 88\" height=\"30\" width=\"40\">&n bsp;<\/td>';
} else {
if (checkevents(da ycounter,monthN um,yearNum,i,x) || ((todaysDay == x) && (todaysDate == daycounter) && (todaysMonth == monthNum))){
if ((todaysDay == x) && (todaysDate == daycounter) && (todaysMonth == monthNum)) {
calendarString += '<td align=\"center\ " bgcolor=\"#AAFF AA\" height=\"30\" width=\"40\">he llo<a href=\"javascri pt:showevents(' + daycounter + ',' + monthNum + ',' + yearNum + ',' + i + ',' + x + ')\">' + daycounter + '<\/a><\/td>';
}
else calendarString += '<td align=\"center\ " bgcolor=\"#FFFF C8\" height=\"30\" width=\"40\"><a href=\"javascri pt:showevents(' + daycounter + ',' + monthNum + ',' + yearNum + ',' + i + ',' + x + ')\">' + daycounter + '<\/a><\/td>';
} else {
calendarString += '<td align=\"center\ " bgcolor=\"#DDFF FF\" height=\"30\" width=\"40\">' + daycounter + '<\/td>';
}
}
}
calendarString += '<\/tr>';
}

calendarString += '<tr><td colspan=\"7\" nowrap align=\"center\ " valign=\"center \" bgcolor=\"#C8C8 96\" width=\"280\" height=\"22\">< a href=\"javascri pt:changedate(\ 'return\')\"><b >Show Current Date<\/b><\/a><\/td><\/tr><\/table>';

var object=document .getElementById ('calendar');
object.innerHTM L= calendarString;
thisDate = 1;
}


function checkevents(day ,month,year,wee k,dayofweek) {
var numevents = 0;
var floater = 0;

for (var i = 0; i < events.length; i++) {
if (events[i][0] == "W") {
if ((events[i][2] == dayofweek)) numevents++;
}
else if (events[i][0] == "Y") {
if ((events[i][2] == day) && (events[i][1] == month)) numevents++;
}
else if (events[i][0] == "F") {
if ((events[i][1] == 3) && (events[i][2] == 0) && (events[i][3] == 0) ) {
easter(year);
if (easterday == day && eastermonth == month) numevents++;
} else {
floater = floatingholiday (year,events[i][1],events[i][2],events[i][3]);
if ((month == 5) && (events[i][1] == 5) && (events[i][2] == 4) && (events[i][3] == 2)) {
if ((floater + 7 <= 31) && (day == floater + 7)) {
numevents++;
} else if ((floater + 7 > 31) && (day == floater)) numevents++;
} else if ((events[i][1] == month) && (floater == day)) numevents++;
}
}
else if ((events[i][2] == day) && (events[i][1] == month) && (events[i][3] == year)) {
numevents++;
}
}

if (numevents == 0) {
return false;
} else {
return true;
}
}


function showevents(day, month,year,week ,dayofweek) {
var theevent = "";
var floater = 0;

for (var i = 0; i < events.length; i++) {
// First we'll process recurring events (if any):
if (events[i][0] != "") {
if (events[i][0] == "D") {
}
if (events[i][0] == "W") {
if ((events[i][2] == dayofweek)) {
theevent += "Events of: \n" + month +'/'+ day +'/'+ year + '\n';
theevent += events[i][6] + '\n';
theevent += 'Start Time: ' + events[i][4] + '\n';
theevent += 'Ending Time: ' + events[i][5] + '\n';
theevent += 'Description: ' + events[i][7] + '\n';
theevent += '\n -------------- \n\n';
document.forms. eventform.event list.value = theevent;
}
}
if (events[i][0] == "M") {
}
if (events[i][0] == "Y") {
if ((events[i][2] == day) && (events[i][1] == month)) {
theevent += "Events of: \n" + month +'/'+ day +'/'+ year + '\n';
theevent += events[i][6] + '\n';
theevent += 'Start Time: ' + events[i][4] + '\n';
theevent += 'Ending Time: ' + events[i][5] + '\n';
theevent += 'Description: ' + events[i][7] + '\n';
theevent += '\n -------------- \n\n';
document.forms. eventform.event list.value = theevent;
}
}
if (events[i][0] == "F") {
if ((events[i][1] == 3) && (events[i][2] == 0) && (events[i][3] == 0) ) {
if (easterday == day && eastermonth == month) {
theevent += "Events of: \n" + month +'/'+ day +'/'+ year + '\n';
theevent += events[i][6] + '\n';
theevent += 'Start Time: ' + events[i][4] + '\n';
theevent += 'Ending Time: ' + events[i][5] + '\n';
theevent += 'Description: ' + events[i][7] + '\n';
theevent += '\n -------------- \n\n';
document.forms. eventform.event list.value = theevent;
}
} else {
floater = floatingholiday (year,events[i][1],events[i][2],events[i][3]);

if ((month == 5) && (events[i][1] == 5) && (events[i][2] == 4) && (events[i][3] == 2)) {
if ((floater + 7 <= 31) && (day == floater + 7)) {
theevent += "Events of: \n" + month +'/'+ day +'/'+ year + '\n';
theevent += events[i][6] + '\n';
theevent += 'Start Time: ' + events[i][4] + '\n';
theevent += 'Ending Time: ' + events[i][5] + '\n';
theevent += 'Description: ' + events[i][7] + '\n';
theevent += '\n -------------- \n\n';
document.forms. eventform.event list.value = theevent;
} else if ((floater + 7 > 31) && (day == floater)) {
theevent += "Events of: \n" + month +'/'+ day +'/'+ year + '\n';
theevent += events[i][6] + '\n';
theevent += 'Start Time: ' + events[i][4] + '\n';
theevent += 'Ending Time: ' + events[i][5] + '\n';
theevent += 'Description: ' + events[i][7] + '\n';
theevent += '\n -------------- \n\n';
document.forms. eventform.event list.value = theevent;
}
} else if ((events[i][1] == month) && (floater == day)) {
theevent += "Events of: \n" + month +'/'+ day +'/'+ year + '\n';
theevent += events[i][6] + '\n';
theevent += 'Start Time: ' + events[i][4] + '\n';
theevent += 'Ending Time: ' + events[i][5] + '\n';
theevent += 'Description: ' + events[i][7] + '\n';
theevent += '\n -------------- \n\n';
document.forms. eventform.event list.value = theevent;
}
}
}
}
// Now we'll process any One Time events happening on the matching month, day, year:
else if ((events[i][2] == day) && (events[i][1] == month) && (events[i][3] == year)) {
theevent += "Events of: \n" + month +'/'+ day +'/'+ year + '\n';
theevent += events[i][6] + '\n';
theevent += 'Start Time: ' + events[i][4] + '\n';
theevent += 'Ending Time: ' + events[i][5] + '\n';
theevent += 'Description: ' + events[i][7] + '\n';
theevent += '\n -------------- \n\n';
document.forms. eventform.event list.value = theevent;
}
}
if (theevent == "") document.forms. eventform.event list.value = 'No events to show.';
}


function floatingholiday (targetyr,targe tmo,cardinalocc urrence,targetd ay) {
// Floating holidays/events of the events.js file uses:
// the Month field for the Month (here it becomes the targetmo field)
// the Day field as the Cardinal Occurrence (here it becomes the cardinaloccurre nce field)
// 1=1st, 2=2nd, 3=3rd, 4=4th, 5=5th, 6=6th occurrence of the day listed next
// the Year field as the Day of the week the event/holiday falls on (here it becomes the targetday field)
// 1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thurday, 6=Friday, 7=Saturday
// example: "F", "1", "3", "2", = Floating holiday in January on the 3rd Monday of that month.
//
// In our code below:
// targetyr is the active year
// targetmo is the active month (1-12)
// cardinaloccurre nce is the xth occurrence of the targetday (1-6)
// targetday is the day of the week the floating holiday is on
// 0=Sun; 1=Mon; 2=Tue; 3=Wed; 4=Thu; 5=Fri; 6=Sat
// Note: subtract 1 from the targetday field if the info comes from the events.js file
//
// Note:
// If Memorial Day falls on the 22nd, 23rd, or 24th, then we add 7 to the dayofmonth to the result.
//
// Example: targetyr = 2052; targetmo = 5; cardinaloccurre nce = 4; targetday = 1
// This is the same as saying our floating holiday in the year 2052, is during May, on the 4th Monday
//
var firstdate = new Date(String(tar getmo)+"/1/"+String(target yr)); // Object Storing the first day of the current month.
var firstday = firstdate.getUT CDay(); // The first day (0-6) of the target month.
var dayofmonth = 0; // zero out our calendar day variable.

targetday = targetday - 1;

if (targetday >= firstday) {
cardinaloccurre nce--; // Subtract 1 from cardinal day.
dayofmonth = (cardinaloccurr ence * 7) + ((targetday - firstday)+1);
} else {
dayofmonth = (cardinaloccurr ence * 7) + ((targetday - firstday)+1);
}
return dayofmonth;
}

</script>

</head>

<body style="backgrou nd-color: transparent;" onload="changed ate('return')">

<p align="center"> Calendar of Events</p>

<center>
<table id="evtcal" border="0" cellpadding="0" cellspacing="0" width="584">
<tbody>
<tr>
<td style="padding: 3px;" align="center" bgcolor="#aaddf f" valign="top" width="314">
<div id="calendar">< !-- Dynamically Filled --></div>
You can move to a different month or year by clicking on the buttons or return to today's date by clicking "Show Current Date".</td>
<td width="10">&nbs p;</td>
<td style="padding: 3px;" align="center" bgcolor="#ffffc 8" valign="top" width="260"><b> Intructions:</b><br />Click a highlighted date on the calendar to see a list of events on that day in the box below.<br /><br />
<center><b><u>E vents</u></b>
<form id="eventform" name="eventform " action="#" method="get">
<textarea name="eventlist " cols="25" rows="11" wrap="soft">Aut o filled when clicking on date.</textarea>
</form>
</center>
</td>
</tr>
</tbody>
</table>
</center>

<br />

<p style="font: normal 11px Arial" align="center"> This free script provided by<br />
<a href="http://www.javascriptk it.com">JavaScr ipt Kit</a></p>

</body>
</html>


[/HTML]

events.js

Expand|Select|Wrap|Line Numbers
  1.  
  2. // This is the Database of Upcoming Events
  3. // Please Edit with Care.
  4. //
  5. // 8 Fields (surrounded by brackets[]) are used for EACH event:
  6. //     ["Recurring", "Month", "Day", "Year", "StartTime", "EndTime", "Name", "Description"]
  7. //     Each event field must be be surrounded by quotation marks followed by a comma ("",) EXCEPT the "Description" field.
  8. //    The "Description" field is surrounded by quotation marks only ("").
  9. //
  10. // Each event has a comma after the closing bracket IF another event is below it on the next line down.
  11. //    Note: The last event in this file should NOT have a comma after the closing bracket
  12. //
  13. // The Recurring field uses:
  14. //    "D" = Daily; "W" = Weekly; "M" = Monthly; "Y" = Yearly; "F" = Floating Holiday
  15. //
  16. // One Time only events should leave the Recurring field blank
  17. //    (ex. "")
  18. //
  19. // Daily events do NOT require that anything be in the Month Day and Year fields
  20. //    Everything in the Month Day and Year fields will be ignored
  21. //
  22. // Weekly events should have the day of the week field set to 1 - 7
  23. //    1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thurday, 6=Friday, 7=Saturday
  24. //
  25. // "F"loating events uses:
  26. //    the Month field for the Month.
  27. //    the Day field as the Cardinal Occurrence
  28. //        1=1st, 2=2nd, 3=3rd, 4=4th, 5=5th, 6=6th occurrence of the day listed next
  29. //    the Year field as the Day of the week the event/holiday falls on
  30. //        1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thurday, 6=Friday, 7=Saturday
  31. //    example: "F",    "1",    "3",    "2", = Floating holiday in January on the 3rd Monday of that month.
  32. //
  33. //    Note: Easter has it's own special formula so Please don't change anything related to Easter below
  34. //
  35. // "Y"early events are specific dates that never change - the Year field is ignored
  36. //    example - Christmas is: "12","25","",
  37. events = new Array(
  38.     ["Y",    "1",    "1",    "2006",    "1:00 AM",    "12:00 PM",    "New Year's Day",    "New Year's Day will be ushered in with great joy and celebration. Come as you are."],
  39.     ["F",    "1",    "3",    "2",    "1:00 AM",    "12:59 PM",    "Martin Luther King Day",    "Honors civil rights leader Rev Martin Luther King."],
  40.     ["Y",    "2",    "2",    "2005",    "1:00 AM",    "12:59 PM",    "Groundhog Day",    "If Philadelphia's groundhog 'Punxsutawney Phil' sees his shadow, there will be six more weeks of winter weather. If he does not see his shadow, there will be an early spring."],
  41.     ["Y",    "2",    "14",    "2005",    "1:00 AM",    "12:59 PM",    "Valentine's Day",    "Traditional celebration of love and romance, including the exchange of cards, candy, flowers, and other gifts."],
  42.     ["F",    "2",    "3",    "2",    "1:00 AM",    "12:59 PM",    "President's Day",    "Honors the birthdays of George Washington, Abraham Lincoln and other past American Presidents."],
  43.     ["F",    "3",    "0",    "0",    "1:00 AM",    "12:59 PM",    "Easter",    "Traditional celebration of the resurrection of Jesus Christ."],
  44.     ["Y",    "3",    "17",    "2005",    "1:00 AM",    "12:59 PM",    "St. Patrick's Day",    "A celebration of Irish heritage and culture, based on the Catholic feast of St. Patrick. Primary activity is simply the wearing of green clothing ('wearing of the green')."],
  45.     ["Y",    "3",    "22",    "2005",    "1:00 AM",    "12:59 PM",    "World Water Day",    "A day to promote appreciation of the world's most valuable commodity - water."],
  46.     ["Y",    "4",    "1",    "2005",    "1:00 AM",    "12:59 PM",    "April Fool's Day",    "A day to play tricks on or 'fool' family, friends, and coworkers, if so inclined. As Ecclesiastes says: 'There is a time for everything'; in this case, a time to be silly."],
  47.     ["F",    "5",    "2",    "1",    "1:00 AM",    "12:59 PM",    "Mother's Day",    "Honors mothers and motherhood (made a Federal Holiday by Presidential order)."],
  48.     ["F",    "5",    "3",    "7",    "1:00 AM",    "12:59 PM",    "Armed Forces Day",    "Celebrates the United States Army, Navy, Air Force and Marine Corps; formerly - each used to have separate days."],
  49.     ["F",    "5",    "4",    "2",    "1:00 AM",    "12:59 PM",    "Memorial Day",    "Honors the nation's war dead, and those we love who have passed away. Traditionally a time to decorate graves and remember those who have gone before us. Also marks traditional beginning of summer."],
  50.     ["Y",    "6",    "14",    "2005",    "1:00 AM",    "12:59 PM",    "Flag Day",    "Honors the American flag, encourages patriotism. Citizens are urged to fly the flag and study its traditions."],
  51.     ["F",    "6",    "3",    "1",    "1:00 AM",    "12:59 PM",    "Father's Day",    "Honors all Fathers and fatherhood."],
  52.     ["Y",    "7",    "4",    "2005",    "1:00 AM",    "12:59 PM",    "Independence Day",    "Celebrates our Declaration of Independence from England in 1776, usually called the Fourth of July."],
  53.     ["F",    "9",    "1",    "2",    "1:00 AM",    "12:59 PM",    "Labor Day",    "Celebrates the achievements of workers, giving them a day of rest - marks traditional end of summer."],
  54.     ["F",    "10",    "2",    "2",    "1:00 AM",    "12:59 PM",    "Columbus' Day",    "Honors the traditional discovery of the Americas by Christopher Columbus."],
  55.     ["Y",    "10",    "31",    "2005",    "1:00 AM",    "12:59 PM",    "Halloween",    "Celebrates All Hallow's Eve, decorations include jack o'lanterns, costume wearing parties, and candy - considered a pagan holiday by many Christians."],
  56.     ["Y",    "11",    "11",    "2005",    "1:00 AM",    "12:59 PM",    "Veteran's Day",    "Honors all veterans of the United States armed forces. A traditional observation is a moment of silence at 11 AM remembering those who fought for peace."],
  57.     ["F",    "11",    "4",    "5",    "1:00 AM",    "12:59 PM",    "Thanksgiving",    "A day to give thanks for your many blessings - traditionally for the Autumn harvest, and it marks the beginning of the 'holiday season'."],
  58.     ["Y",    "12",    "25",    "2005",    "1:00 AM",    "12:59 PM",    "Christmas",    "Celebration of the traditional day of Jesus' birth - God was made flesh and dwelt among us."]
  59. // Please omit the final comma after the ] from the last line above unless you are going to add another event at this time.
  60. );
Nov 12 '08 #1
1 4911
acoder
16,027 Recognized Expert Moderator MVP
Line 271 sets the text box value. Change that to use the the target/srcElement (the target of the event).
Nov 12 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1811
by: luca | last post by:
I'm trying to build a Server Control, it's a calendar to manage sellers appointments (don't answer me to use and custumize Calendar Control because unluckily it's not possible for this specific project). A piece of my control's interface is composed of a table and in each of its cells are stored informations about a seller, a date and a time range. Each of these cells has to be an interactive element: I should be able to process datas...
3
1194
by: Luis E Valencia | last post by:
I have a table that says for example 01/05/2004 Party IIsadpaks 01/06/2004 Party 2394923423 A events table. I want to make a calendar and that the days that are events are inbold and with a link to a detail of the events of that day.
4
1619
by: VB Programmer | last post by:
I have a bunch of events and appointments in a sql server db. What is the best way to fill a calendar with this data? As I switch months I want it to repopulate with the "current" months data. I'd like it to kind of work like a basic Outlook calendar. Thanks!
2
3771
by: jodyblau | last post by:
I am trying use a Calendar Control 10.0 in one of my forms. (I am using access 2002) What I want to do is have the user click a button which makes the calendar visible. Then when the user clicks on a date, it sends it to a text box and then the calendar should disappear. All of the examples I have been able to track down seem to use events that aren't available to me. Most notably, any click events.
0
1137
by: prabhupr | last post by:
Hi Folks Is there anybody who has a sample code which does provide the functionality of adding event/reminder from my ASPx page to Outlook calendar. For example, if you visit this site http://www.msreadiness.com, try registering for an event which finally opens a page and lets you add a reminder to your calendar. Any help please
4
2849
by: Dinsdale | last post by:
I'm looking at adding scheduling features to an application and I wanted to ask the community about any experience with scheduling components, either open source like from code project or from a vendor. I'd like to be able to create schedules and lock resources for things like collision detection (two events trying to use the same resource). I've seen some GANTT charting components but I don't think that's what I'm looking for. I'd...
0
1512
by: Dutchy | last post by:
Hi All, I have a spreadsheet that is basically a list of events with start and end date, country, location and business unit organising the event. Instead of copying each and every event into a excel calendar (for the format I could imagine the calendar to look like the example on: http://www.vertex42.com/ExcelTemplates/excel-calendar-template.html) I would like to automatically parse the spreadsheet data and publish it in the...
6
2251
by: hal | last post by:
Hello All, I got this code somewhere, so i'm not even sure if this is the best way to do this. Basically what i want is to display events in an asp.net calendar control which i'm able to do, but not when i have two events on the same day. I'm getting the data for the events from an XML file. Here's my code. aspx page just has the calendar control.
6
1976
nomad
by: nomad | last post by:
Hello Everyone: I'm having troubles with some coding and Idon't know where it is. I have delevopled a calender where the client can add events to a day. The code worked perfect on my computer but when I transfer the info I get this error. The server encountered an unexpected condition which prevented it from fulfilling the request. The script had an error or it did not produce any output. If there was an error, you should be able to see...
0
9825
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9671
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10558
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10600
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9387
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6981
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5829
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4022
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.