aboutsummaryrefslogtreecommitdiffstats
path: root/csci4131/hw5/strap012_hw5/client/contacts.html
diff options
context:
space:
mode:
authorRossTheRoss <mstrapp@protonmail.com>2021-03-22 13:24:16 -0500
committerRossTheRoss <mstrapp@protonmail.com>2021-03-22 13:24:16 -0500
commit4b63b00c32b767d24b114d38dab8c154d6321a7b (patch)
tree306922a0663513ff37241716d24084b6f1a985f7 /csci4131/hw5/strap012_hw5/client/contacts.html
parentalmost delete file (diff)
downloadhomework-4b63b00c32b767d24b114d38dab8c154d6321a7b.tar
homework-4b63b00c32b767d24b114d38dab8c154d6321a7b.tar.gz
homework-4b63b00c32b767d24b114d38dab8c154d6321a7b.tar.bz2
homework-4b63b00c32b767d24b114d38dab8c154d6321a7b.tar.lz
homework-4b63b00c32b767d24b114d38dab8c154d6321a7b.tar.xz
homework-4b63b00c32b767d24b114d38dab8c154d6321a7b.tar.zst
homework-4b63b00c32b767d24b114d38dab8c154d6321a7b.zip
Start Extra credit
Diffstat (limited to '')
-rwxr-xr-xcsci4131/hw5/strap012_hw5/client/contacts.html23
1 files changed, 10 insertions, 13 deletions
diff --git a/csci4131/hw5/strap012_hw5/client/contacts.html b/csci4131/hw5/strap012_hw5/client/contacts.html
index 2e4bf65..15e4032 100755
--- a/csci4131/hw5/strap012_hw5/client/contacts.html
+++ b/csci4131/hw5/strap012_hw5/client/contacts.html
@@ -23,19 +23,16 @@
var contacts = a.contacts;
for (let i = 0; i < contacts.length; i++) {
var contact = contacts[i];
- var row = table.insertRow(-1);
- var nam = row.insertCell(0);
- nam.innerHTML = contact.name;
- var cat = row.insertCell(1);
- cat.innerHTML = contact.category;
- var loc = row.insertCell(2);
- loc.innerHTML = contact.location;
- var con = row.insertCell(3);
- con.innerHTML = contact.contact;
- var ema = row.insertCell(4);
- ema.innerHTML = contact.email;
- var url = row.insertCell(5);
- url.innerHTML = "<a href =" + contact.website_url + ">" + contact.website_url + "</a>";
+ var row = table.insertRow();
+ for (var j in contact) {
+ if (j != "website_url") {
+ var value = row.insertCell();
+ value.innerHTML = contact[j];
+ } else {
+ var url = row.insertCell();
+ url.innerHTML = "<a href =" + contact[j] + ">" + contact[j] + "</a>";
+ }
+ }
}
}