daily scheduler
datestamp = "";
datestamp += "";
datestamp += "";
datestamp += " Daily Scheduler";
datestamp += "";
//Check if the day scheduler is for the current date
if(date[1] == dt) {
datestamp += "" + date[0] + " " + date[1] + " ";
} else {
datestamp += "" + date[0] + " " + date[1] + " ";
}
datestamp += "";
datestamp += "";
datestamp += "";
datestamp += "";
//no cookie is set
if(!document.cookie || document.cookie == null) {
dayschedule = "There are no reminders set";
} else {
rdate = date[0]+date[1];
remind = getCookie(rdate);
//if there is a cookie but none for that date
if(remind == "" || remind == null) {
dayschedule = "There are no reminders set";
//there is a cookie for that date
} else {
//find number of reminders and set variable
if(remind.indexOf("|")) {
remind = remind.split("|");
rlen = remind.length;
} else {
rlen = 1;
}
var displaytext = "";
var currenttext = "";
//write out reminders on page
for(var i = 0;i < rlen; i++) {
currenttext = remind[i];
//if the reminder is a long string without spaces, add break after every 20 characters
if((currenttext.length - 1) > 25 && currenttext.indexOf(" ") < 0) {
for(var x = 0; x
function editRemind(editable) {
document.location = "edit_reminder.html?" + date[0] + "&" + date[1] + "&" + editable;
}
//if more than one checkbox is selected... while statement????
function deleteRemind() {
if(rlen == 0) {
alert("There is nothing to delete.");
} else {
remind = getCookie(rdate);
rlist = remind.split("|");
//Get the exact reminders to delete
var j = 0;
for(var i = 0; i < rlen; i++) {
if(eval("document.forms[0].ckbox" + i + ".checked")) {
todelete[j] = i;
j++;
}
}
//if nothing is selected to be deleted
if(todelete.length == 0) {
alert("Nothing is checked");
} else {
//go through list and mark each spot for deletion
for(var i = 0; i < todelete.length; i++) {
var x = 0;
for (j = 0; j < rlist.length; j++) {
if(todelete[i] == j) {
temp[x] = "del";
} else
if(temp[x] != "del") {
temp[x] = rlist[j];
}
x++;
}
}
//recompile the list without the marked spots
var x = 0;
for(var i = 0; i < temp.length; i++) {
if(temp[i] != "del") {
copy[x] = temp[i];
x++;
}
}
//use recompiled list, add delimiters, string in one variable
if(copy.length > 0) {
newlist = copy[0];
for(var i = 1; i < copy.length; i++) {
newlist += "|" + copy[i];
}
} else {
newlist = "";
}
//write out the new info to the cookie
var expiration = new Date();
var twoweeks = expiration.getTime() + (14 * 24 * 60 * 60 * 1000);
expiration.setTime(twoweeks);
setCookie(date[0] + date[1],newlist,expiration);
}
}
//reset document
document.forms[0].reset();
//refresh document
document.location = "day_scheduler.html?" + date[0] + "&" + date[1];
//show results on calendar
window.opener.location = "calendar.html";
}
function open_window(url,width, height, resize, scroll) {
child = window.open(url,"newwindow", "width=" + width + ",height=" + height + ",resizable=" + resize + ",scrollbars=" + scroll + "");
}
//-->
close
delete reminder(s)
Wyszukiwarka
Podobne podstrony:
Oh happy dayschedule and assign workcD7C4DFSylvia Day Wyznanie Crossa # 3 Rozdział 9Beginning Short Stories with Quetsions, An Overcast Day300 per day on ebaygreen day welcome to paradiseM A Foster@Ler 03@The Day of the Kleshgreen day walking alonedayOther Hybrid Workout SchedulesConstantelos Greek Orthodoxy From Apostolic Times to the Present DayInsanity Workout Schedule[Carnivale s01e12 The Day That Was The Dayschedulegreen day bab s uvula whodayMidsummers Day Wordsearch Answer Keywięcej podobnych podstron