new alerts

This commit is contained in:
Huang,Yonggang 2024-06-09 15:37:25 +08:00
parent e4004f0f85
commit abe788b012
1 changed files with 2 additions and 3 deletions

View File

@ -34,7 +34,6 @@
getTextFileFromURL(todayurl, "today");
getTextFileFromURL(tomorrowurl, "tomorrow");
if (seasonurl != '') {
alert(seasonurl);
getTododataFromURL(seasonurl, "todo");
}
}
@ -47,7 +46,6 @@
alert(xmlhttp.responseText); */
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
var seaonobj = YAML.parse(xmlhttp.responseText);
alert(seaonobj.time.alloc.PSMD);
var statobj = new Object();
statobj.total = { alloc: 0, sold: 0, hold: 0, todo: 0 };
for (var task in seasonobj.time.alloc) {
@ -81,7 +79,7 @@
statobj[task].todo = this.todosum(seasonobj.todo[task]);
statobj.total.todo = statobj.total.todo + statobj[task].todo;
}
alert(YAML.dump(statobj));
alert(YAML.stringify(statobj));
const tbl = document.createElement("table");
const tblBody = document.createElement("tbody");
const row = document.createElement("tr");
@ -107,6 +105,7 @@
tblBody.appendChild(row);
for (var task in statobj) {
alert(task);
row = document.createElement("tr");
cell = document.createElement("td");
cell.appendChild(task);