From 6e3af02d1ec808c1e0e223aae3cecf0bd75d89ba Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Tue, 6 Nov 2018 19:03:30 -0500 Subject: [PATCH 01/84] Create test.html --- test/test.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/test.html diff --git a/test/test.html b/test/test.html new file mode 100644 index 0000000..ba137a1 --- /dev/null +++ b/test/test.html @@ -0,0 +1,9 @@ + + + Test Document + + + +

This is test page

+ + From 71c89ff5bd339244c6dc0146fb136e6331871942 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Tue, 6 Nov 2018 19:05:36 -0500 Subject: [PATCH 02/84] Update test.html --- test/test.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/test.html b/test/test.html index ba137a1..23b4353 100644 --- a/test/test.html +++ b/test/test.html @@ -1,7 +1,13 @@ Test Document - +

This is test page

From a8c46f6c96c052f354a671833ae305cfa47bbe43 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Tue, 6 Nov 2018 19:07:57 -0500 Subject: [PATCH 03/84] Update test.html --- test/test.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test.html b/test/test.html index 23b4353..2f6134a 100644 --- a/test/test.html +++ b/test/test.html @@ -11,5 +11,7 @@

This is test page

+ +
From 163918465419ddc488017357affd441e079851c4 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Tue, 6 Nov 2018 19:29:14 -0500 Subject: [PATCH 04/84] Update test.html --- test/test.html | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/test/test.html b/test/test.html index 2f6134a..09c5766 100644 --- a/test/test.html +++ b/test/test.html @@ -7,11 +7,36 @@ margin: 64px auto; font-family: Arial; } + table { border-collapse: collapse; } + th, tr { border: 1px solid black; } -

This is test page

- +
This is test page
+
+ From 2ae25d7a683e4c89830a7bad1660b9fee99656fc Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Tue, 6 Nov 2018 19:30:55 -0500 Subject: [PATCH 05/84] Create test.json --- test/test.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/test.json diff --git a/test/test.json b/test/test.json new file mode 100644 index 0000000..cd8ceb4 --- /dev/null +++ b/test/test.json @@ -0,0 +1,6 @@ +{ + + "Artist": "Dire Straits", + "Album": "Brothers in Arms" + +} From dfacd58832845500d1a186b547fc95e53951fef5 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Tue, 6 Nov 2018 19:33:27 -0500 Subject: [PATCH 06/84] Update test.html --- test/test.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test.html b/test/test.html index 09c5766..40a6d98 100644 --- a/test/test.html +++ b/test/test.html @@ -17,9 +17,11 @@
+ }; + xhttp.open("GET", "cd_catalog.xml", true); + xhttp.send(); +} +function myFunction(xml) { + var i; + var xmlDoc = xml.responseXML; + var table="ArtistTitle"; + var x = xmlDoc.getElementsByTagName("CD"); + for (i = 0; i " + + x[i].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue + + ""; + } + document.getElementById("demo").innerHTML = table; +} + + From 99204ff457a6798c0ed53bf73412f2ad5e654e50 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Tue, 6 Nov 2018 20:23:46 -0500 Subject: [PATCH 12/84] Update and rename test.json to cd_catalog.xml --- test/cd_catalog.xml | 210 ++++++++++++++++++++++++++++++++++++++++++++ test/test.json | 6 -- 2 files changed, 210 insertions(+), 6 deletions(-) create mode 100644 test/cd_catalog.xml delete mode 100644 test/test.json diff --git a/test/cd_catalog.xml b/test/cd_catalog.xml new file mode 100644 index 0000000..c6ae0ef --- /dev/null +++ b/test/cd_catalog.xml @@ -0,0 +1,210 @@ + + +Empire Burlesque +Bob Dylan +USA +Columbia +10.90 +1985 + + +Hide your heart +Bonnie Tyler +UK +CBS Records +9.90 +1988 + + +Greatest Hits +Dolly Parton +USA +RCA +9.90 +1982 + + +Still got the blues +Gary Moore +UK +Virgin records +10.20 +1990 + + +Eros +Eros Ramazzotti +EU +BMG +9.90 +1997 + + +One night only +Bee Gees +UK +Polydor +10.90 +1998 + + +Sylvias Mother +Dr.Hook +UK +CBS +8.10 +1973 + + +Maggie May +Rod Stewart +UK +Pickwick +8.50 +1990 + + +Romanza +Andrea Bocelli +EU +Polydor +10.80 +1996 + + +When a man loves a woman +Percy Sledge +USA +Atlantic +8.70 +1987 + + +Black angel +Savage Rose +EU +Mega +10.90 +1995 + + +1999 Grammy Nominees +Many +USA +Grammy +10.20 +1999 + + +For the good times +Kenny Rogers +UK +Mucik Master +8.70 +1995 + + +Big Willie style +Will Smith +USA +Columbia +9.90 +1997 + + +Tupelo Honey +Van Morrison +UK +Polydor +8.20 +1971 + + +Soulsville +Jorn Hoel +Norway +WEA +7.90 +1996 + + +The very best of +Cat Stevens +UK +Island +8.90 +1990 + + +Stop +Sam Brown +UK +A and M +8.90 +1988 + + +Bridge of Spies +T'Pau +UK +Siren +7.90 +1987 + + +Private Dancer +Tina Turner +UK +Capitol +8.90 +1983 + + +Midt om natten +Kim Larsen +EU +Medley +7.80 +1983 + + +Pavarotti Gala Concert +Luciano Pavarotti +UK +DECCA +9.90 +1991 + + +The dock of the bay +Otis Redding +USA +Stax Records +7.90 +1968 + + +Picture book +Simply Red +EU +Elektra +7.20 +1985 + + +Red +The Communards +UK +London +7.80 +1987 + + +Unchain my heart +Joe Cocker +USA +EMI +8.20 +1987 + + diff --git a/test/test.json b/test/test.json deleted file mode 100644 index cd8ceb4..0000000 --- a/test/test.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - - "Artist": "Dire Straits", - "Album": "Brothers in Arms" - -} From ec86ccd956043d6b77a1697d7b9a8e5dc25183fc Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 08:38:58 -0500 Subject: [PATCH 13/84] Update cd_catalog.xml --- test/cd_catalog.xml | 192 -------------------------------------------- 1 file changed, 192 deletions(-) diff --git a/test/cd_catalog.xml b/test/cd_catalog.xml index c6ae0ef..12ad446 100644 --- a/test/cd_catalog.xml +++ b/test/cd_catalog.xml @@ -15,196 +15,4 @@ 9.90 1988 - -Greatest Hits -Dolly Parton -USA -RCA -9.90 -1982 - - -Still got the blues -Gary Moore -UK -Virgin records -10.20 -1990 - - -Eros -Eros Ramazzotti -EU -BMG -9.90 -1997 - - -One night only -Bee Gees -UK -Polydor -10.90 -1998 - - -Sylvias Mother -Dr.Hook -UK -CBS -8.10 -1973 - - -Maggie May -Rod Stewart -UK -Pickwick -8.50 -1990 - - -Romanza -Andrea Bocelli -EU -Polydor -10.80 -1996 - - -When a man loves a woman -Percy Sledge -USA -Atlantic -8.70 -1987 - - -Black angel -Savage Rose -EU -Mega -10.90 -1995 - - -1999 Grammy Nominees -Many -USA -Grammy -10.20 -1999 - - -For the good times -Kenny Rogers -UK -Mucik Master -8.70 -1995 - - -Big Willie style -Will Smith -USA -Columbia -9.90 -1997 - - -Tupelo Honey -Van Morrison -UK -Polydor -8.20 -1971 - - -Soulsville -Jorn Hoel -Norway -WEA -7.90 -1996 - - -The very best of -Cat Stevens -UK -Island -8.90 -1990 - - -Stop -Sam Brown -UK -A and M -8.90 -1988 - - -Bridge of Spies -T'Pau -UK -Siren -7.90 -1987 - - -Private Dancer -Tina Turner -UK -Capitol -8.90 -1983 - - -Midt om natten -Kim Larsen -EU -Medley -7.80 -1983 - - -Pavarotti Gala Concert -Luciano Pavarotti -UK -DECCA -9.90 -1991 - - -The dock of the bay -Otis Redding -USA -Stax Records -7.90 -1968 - - -Picture book -Simply Red -EU -Elektra -7.20 -1985 - - -Red -The Communards -UK -London -7.80 -1987 - - -Unchain my heart -Joe Cocker -USA -EMI -8.20 -1987 - From 658c70d720dfa83d8d0113a9178677bea8882fc2 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 09:07:22 -0500 Subject: [PATCH 14/84] Update test.html --- test/test.html | 49 ++++++++++++++++++++----------------------------- 1 file changed, 20 insertions(+), 29 deletions(-) diff --git a/test/test.html b/test/test.html index 4ba5df7..b4f9c69 100644 --- a/test/test.html +++ b/test/test.html @@ -1,46 +1,37 @@ - + + + Test Document + + + #demo { + width: 1200px; + margin: 9px auto; + border: 2px solid blue; + } +

The XMLHttpRequest Object

- +

-
+
From 434c82729826c4bf87776003d1ec0263b85ffccb Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 09:08:29 -0500 Subject: [PATCH 15/84] Update test.html --- test/test.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/test.html b/test/test.html index b4f9c69..153baa1 100644 --- a/test/test.html +++ b/test/test.html @@ -5,11 +5,13 @@ Test Document - #demo { - width: 1200px; - margin: 9px auto; - border: 2px solid blue; - } + From 64a88a422f78d6f0b40a5d3c15ddcb522e2785ba Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 09:09:56 -0500 Subject: [PATCH 16/84] Update test.html --- test/test.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test.html b/test/test.html index 153baa1..117e7e5 100644 --- a/test/test.html +++ b/test/test.html @@ -29,7 +29,7 @@ function loadHTML() { myFunction(this); } }; - http.open("GET", "cd_catalog.xml", true); + http.open("GET", "../rpm/linkboard.html", true); http.send(); } function myFunction(data) { From b6541e79c49aca90636751409c9b4cf24a4a3e44 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 09:23:17 -0500 Subject: [PATCH 17/84] Update test.html --- test/test.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test.html b/test/test.html index 117e7e5..e8a8b45 100644 --- a/test/test.html +++ b/test/test.html @@ -20,6 +20,8 @@

+ + + + From f3767a523dd503e869ee98c9cadac5fe1ab5e7c6 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 09:33:00 -0500 Subject: [PATCH 19/84] Update test.html --- test/test.html | 1 - 1 file changed, 1 deletion(-) diff --git a/test/test.html b/test/test.html index 93004ef..838dff7 100644 --- a/test/test.html +++ b/test/test.html @@ -10,7 +10,6 @@ width: 1200px; height: 100%; margin: 9px auto; - border: 2px solid blue; } From a735ad3a2e5b8aba39c60f347ecbabff1b54e721 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 09:35:33 -0500 Subject: [PATCH 20/84] Update test.html --- test/test.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/test.html b/test/test.html index 838dff7..f3797f8 100644 --- a/test/test.html +++ b/test/test.html @@ -16,8 +16,6 @@

The XMLHttpRequest Object

- -

From 99e0d62178bb2820262a7e23fefb6fc0199988b7 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 09:38:19 -0500 Subject: [PATCH 21/84] Update test.html --- test/test.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/test.html b/test/test.html index f3797f8..7a7921f 100644 --- a/test/test.html +++ b/test/test.html @@ -14,9 +14,7 @@ - -

The XMLHttpRequest Object

-

+
- + From 2e3ca768dd14dce0484ba222a3f5241c2b2337e5 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 10:12:43 -0500 Subject: [PATCH 23/84] Update test.html --- test/test.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test.html b/test/test.html index 4fe1ffe..3b128f0 100644 --- a/test/test.html +++ b/test/test.html @@ -14,7 +14,7 @@ - +
From 1b8bf255d20b68052a218e3b8a8ed6b77f9ef086 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 10:18:22 -0500 Subject: [PATCH 26/84] Update test.html --- test/test.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test.html b/test/test.html index 31d4060..b3395aa 100644 --- a/test/test.html +++ b/test/test.html @@ -31,7 +31,7 @@ function loadHTML() { } function myFunction(data) { document.getElementById("demo").innerHTML = data.responseText; -// document.setElementById('fetchScript').addAttribute('src', '../app/functions.js'>; + document.getElementById('fetchScript').addAttribute('src', '../app/functions.js'>; } From 4ced6e9775212c975897b1915c695c384bd299e2 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 10:20:09 -0500 Subject: [PATCH 27/84] Update test.html --- test/test.html | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/test/test.html b/test/test.html index b3395aa..ee37f1b 100644 --- a/test/test.html +++ b/test/test.html @@ -19,23 +19,25 @@
+ From a7b9c51c66d96875eb0bf3e978fd84414e9573ae Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 10:26:35 -0500 Subject: [PATCH 28/84] Update test.html --- test/test.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test.html b/test/test.html index ee37f1b..9b71472 100644 --- a/test/test.html +++ b/test/test.html @@ -36,7 +36,7 @@ From d6507e20c6c1ddd386483c399139a95820ebbfd6 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 10:48:46 -0500 Subject: [PATCH 29/84] Update test.html --- test/test.html | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/test.html b/test/test.html index 9b71472..2d33e02 100644 --- a/test/test.html +++ b/test/test.html @@ -17,6 +17,7 @@
+ - - - From f49122073a9affec37c9a30d80e40a7974f3804b Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 10:59:42 -0500 Subject: [PATCH 30/84] Delete test.html --- test/test.html | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 test/test.html diff --git a/test/test.html b/test/test.html deleted file mode 100644 index 2d33e02..0000000 --- a/test/test.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - Test Document - - - - - -
- -
- - - - - - From 697fc4eba38fcd236233a609d3adcad44e5063ad Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 10:59:51 -0500 Subject: [PATCH 31/84] Delete cd_catalog.xml --- test/cd_catalog.xml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 test/cd_catalog.xml diff --git a/test/cd_catalog.xml b/test/cd_catalog.xml deleted file mode 100644 index 12ad446..0000000 --- a/test/cd_catalog.xml +++ /dev/null @@ -1,18 +0,0 @@ - - -Empire Burlesque -Bob Dylan -USA -Columbia -10.90 -1985 - - -Hide your heart -Bonnie Tyler -UK -CBS Records -9.90 -1988 - - From 4e5826bc597aedac43b7a15aa45265ccc423cd17 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 11:22:56 -0500 Subject: [PATCH 32/84] Create page.html --- ajax-requests/page.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 ajax-requests/page.html diff --git a/ajax-requests/page.html b/ajax-requests/page.html new file mode 100644 index 0000000..b69426f --- /dev/null +++ b/ajax-requests/page.html @@ -0,0 +1,16 @@ + + + + Ajax + + + + + +

Test different document types


+ + + +
+ + From 8d45a84a744e292cf501069cc38008c3a36bcbcc Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 11:41:54 -0500 Subject: [PATCH 33/84] Create test.html --- test/test.html | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/test.html diff --git a/test/test.html b/test/test.html new file mode 100644 index 0000000..2128acd --- /dev/null +++ b/test/test.html @@ -0,0 +1 @@ +Test

Test

From 7576294fc8f386c1382ac09661fc772e2f11b456 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 13:36:08 -0500 Subject: [PATCH 34/84] Update page.html --- ajax-requests/page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax-requests/page.html b/ajax-requests/page.html index b69426f..f77928c 100644 --- a/ajax-requests/page.html +++ b/ajax-requests/page.html @@ -7,7 +7,7 @@ -

Test different document types


+

Test different document types

From 65310c009f9d955dd798ef8e01986eaa16fdb3b4 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 13:43:01 -0500 Subject: [PATCH 35/84] Update page.html --- ajax-requests/page.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ajax-requests/page.html b/ajax-requests/page.html index f77928c..476a974 100644 --- a/ajax-requests/page.html +++ b/ajax-requests/page.html @@ -4,7 +4,7 @@ Ajax - +

Test different document types

@@ -12,5 +12,6 @@
+ From cd99c410e6fdee19f5beb81888792c7c19adba36 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 13:45:35 -0500 Subject: [PATCH 36/84] Create jsonCap.js --- ajax-requests/js/jsonCap.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 ajax-requests/js/jsonCap.js diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ajax-requests/js/jsonCap.js @@ -0,0 +1 @@ + From 3066366d0949de69f3e3e22dcf3a2ff8f33fea0c Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 14:19:01 -0500 Subject: [PATCH 37/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index 8b13789..6f09a09 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -1 +1,28 @@ - +function captureJSON() { + var xhr = new XMLHttpRequest(); + xhr.onload = funtion() { + if (xhr.status >= 200 && xhr.status < 400) { + var div = document.getElementById('capturedJSON'), + content = '', + respObj = JSON.parse(xhr.responseText), + len = respObj.length, + var i; + console.log(xhr.responseText); + content += ''; + content += ''; + for (i = 0; i < len; i++) { + content += ''; + content += ''; + content += ''; + content += ''; + if (i == len) content += '
CompanyFirst NameLast NameTitle
' + respObj[i].Company + '' + respObj[i]['First Name'] + '' + respObj[i]['Last Name'] + '' + respObj[i].Title + '
'; + } + if (div.innerHTML != '') content = ''; + div.innerHTML = content; + } else { + console.log('Connection to Server succeeded. Content was not received due to error.'); + } + }; + xhr.open('GET', '../files/jsonData.json', true); + xhr.send(); +} From 2fc4ec55d0ee3c22a2b6d773f2d351fd4c15e89d Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 14:21:55 -0500 Subject: [PATCH 38/84] Create jsonData.json --- ajax-requests/files/jsonData.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ajax-requests/files/jsonData.json diff --git a/ajax-requests/files/jsonData.json b/ajax-requests/files/jsonData.json new file mode 100644 index 0000000..a9617b7 --- /dev/null +++ b/ajax-requests/files/jsonData.json @@ -0,0 +1,20 @@ +[ + { + "Company": "CAROLINA LOGISTIC, INC.", + "First Name": "Valentin", + "Last Name": "Khoroshkov", + "Title": "Driver Payroll" + }, + { + "Company": "CAROLINA LOGISTIC, INC.", + "First Name": "Daniel", + "Last Name": "Pilyev", + "Title": "IT Manager" + }, + { + "Company": "CAROLINA LOGISTIC, INC.", + "First Name": "Bob", + "Last Name": "Tumash", + "Title": "Dispatcher" + }, +] From 0f3d518708e83fe5383de47738bdd06e39057038 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 14:23:45 -0500 Subject: [PATCH 39/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index 6f09a09..c5b80fd 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -1,6 +1,6 @@ function captureJSON() { var xhr = new XMLHttpRequest(); - xhr.onload = funtion() { + xhr.onload = function() { if (xhr.status >= 200 && xhr.status < 400) { var div = document.getElementById('capturedJSON'), content = '', From 3849560b2e21062b5de15629d379b7f906a95b68 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 14:24:36 -0500 Subject: [PATCH 40/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index c5b80fd..d771472 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -6,7 +6,7 @@ function captureJSON() { content = '', respObj = JSON.parse(xhr.responseText), len = respObj.length, - var i; + i; console.log(xhr.responseText); content += ''; content += ''; From d90a3881ece29c7153498e8eaadf8630ed47c5df Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 14:29:40 -0500 Subject: [PATCH 41/84] Update page.html --- ajax-requests/page.html | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/ajax-requests/page.html b/ajax-requests/page.html index 476a974..dae575f 100644 --- a/ajax-requests/page.html +++ b/ajax-requests/page.html @@ -12,6 +12,36 @@
- + + From b130c8be87adcb15a8d992efb25735031091068f Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 14:31:59 -0500 Subject: [PATCH 42/84] Update jsonData.json --- ajax-requests/files/jsonData.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax-requests/files/jsonData.json b/ajax-requests/files/jsonData.json index a9617b7..0d33114 100644 --- a/ajax-requests/files/jsonData.json +++ b/ajax-requests/files/jsonData.json @@ -16,5 +16,5 @@ "First Name": "Bob", "Last Name": "Tumash", "Title": "Dispatcher" - }, + } ] From 0966ec56a2b97d5ed501cfb6c67703ebacb8a797 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 14:33:30 -0500 Subject: [PATCH 43/84] Update page.html --- ajax-requests/page.html | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/ajax-requests/page.html b/ajax-requests/page.html index dae575f..476a974 100644 --- a/ajax-requests/page.html +++ b/ajax-requests/page.html @@ -12,36 +12,6 @@
- - + From 98f06394d2c28990c7d02b0c5ed7effc1fd5815b Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 14:34:36 -0500 Subject: [PATCH 44/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index d771472..57a7da9 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -1,3 +1,5 @@ +(funtion() { console.log('jsonCap.js is running...'); }()); + function captureJSON() { var xhr = new XMLHttpRequest(); xhr.onload = function() { From 0c566288893d95b247df3301c2c2f94e74c95109 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 14:35:16 -0500 Subject: [PATCH 45/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index 57a7da9..4924ce7 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -25,6 +25,6 @@ function captureJSON() { console.log('Connection to Server succeeded. Content was not received due to error.'); } }; - xhr.open('GET', '../files/jsonData.json', true); + xhr.open('GET', 'files/jsonData.json', true); xhr.send(); } From f1e340384efd2fcfd3ee345f88dd77b54194eea0 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 14:38:46 -0500 Subject: [PATCH 46/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index 4924ce7..0b1459f 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -1,4 +1,4 @@ -(funtion() { console.log('jsonCap.js is running...'); }()); +// (funtion() { console.log('jsonCap.js is running...'); }()); function captureJSON() { var xhr = new XMLHttpRequest(); From 7a2ff6975075d05cdca2b81c8a1b08327075db8a Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 14:39:31 -0500 Subject: [PATCH 47/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index 0b1459f..708dd4d 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -1,4 +1,4 @@ -// (funtion() { console.log('jsonCap.js is running...'); }()); +console.log('jsonCap.js is running...'); function captureJSON() { var xhr = new XMLHttpRequest(); From 83ed810db780a322de1dd0c9de52117d13c7be9c Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 14:43:19 -0500 Subject: [PATCH 48/84] Update page.html --- ajax-requests/page.html | 1 + 1 file changed, 1 insertion(+) diff --git a/ajax-requests/page.html b/ajax-requests/page.html index 476a974..95a994e 100644 --- a/ajax-requests/page.html +++ b/ajax-requests/page.html @@ -4,6 +4,7 @@ Ajax + From 896604a35a490d54f94bbd00aa2ae7e71bdc183e Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 14:43:45 -0500 Subject: [PATCH 49/84] Update page.html --- ajax-requests/page.html | 1 - 1 file changed, 1 deletion(-) diff --git a/ajax-requests/page.html b/ajax-requests/page.html index 95a994e..f664a99 100644 --- a/ajax-requests/page.html +++ b/ajax-requests/page.html @@ -5,7 +5,6 @@ -

Test different document types

From 909c3788fcc115e7cb3ee8c7dc3fbeece555219b Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 14:48:31 -0500 Subject: [PATCH 50/84] Create style.css --- ajax-requests/css/style.css | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ajax-requests/css/style.css diff --git a/ajax-requests/css/style.css b/ajax-requests/css/style.css new file mode 100644 index 0000000..8a96eb9 --- /dev/null +++ b/ajax-requests/css/style.css @@ -0,0 +1,15 @@ +* { + font-family:Arial; +} +body { + margin:24px auto; + width:870px; +} +table { + margin-top: 12px; +} + +th, td { + border: 1px solid black; + border-collapse: collapse; +} From f7aeec6d30f6c0d5283b8648d3005866ce824839 Mon Sep 17 00:00:00 2001 From: vkservicesllc <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 14:57:53 -0500 Subject: [PATCH 51/84] Update style.css --- ajax-requests/css/style.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ajax-requests/css/style.css b/ajax-requests/css/style.css index 8a96eb9..7d60573 100644 --- a/ajax-requests/css/style.css +++ b/ajax-requests/css/style.css @@ -1,9 +1,9 @@ * { - font-family:Arial; + font-family: Arial; } body { - margin:24px auto; - width:870px; + margin: 24px auto; + width: 870px; } table { margin-top: 12px; From ea636656a18f76abd8445544703517b3a3af3e1d Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 15:08:21 -0500 Subject: [PATCH 52/84] Update jsonData.json --- ajax-requests/files/jsonData.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ajax-requests/files/jsonData.json b/ajax-requests/files/jsonData.json index 0d33114..b0e8db8 100644 --- a/ajax-requests/files/jsonData.json +++ b/ajax-requests/files/jsonData.json @@ -16,5 +16,11 @@ "First Name": "Bob", "Last Name": "Tumash", "Title": "Dispatcher" + }, + { + "Company": "CAROLINA LOGISTIC, INC.", + "First Name": "Kevin", + "Last Name": "Bondarenko", + "Title": "Insurance" } ] From 2ffae59b9b4287f2af79da80c1d9dbfdce987db5 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 15:24:58 -0500 Subject: [PATCH 53/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 40 +++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index 708dd4d..9d72780 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -3,26 +3,28 @@ console.log('jsonCap.js is running...'); function captureJSON() { var xhr = new XMLHttpRequest(); xhr.onload = function() { - if (xhr.status >= 200 && xhr.status < 400) { - var div = document.getElementById('capturedJSON'), - content = '', - respObj = JSON.parse(xhr.responseText), - len = respObj.length, - i; - console.log(xhr.responseText); - content += '
CompanyFirst NameLast NameTitle
'; - content += ''; - for (i = 0; i < len; i++) { - content += ''; - content += ''; - content += ''; - content += ''; - if (i == len) content += '
CompanyFirst NameLast NameTitle
' + respObj[i].Company + '' + respObj[i]['First Name'] + '' + respObj[i]['Last Name'] + '' + respObj[i].Title + '
'; + var div = document.getElementById('capturedJSON'), + content = '', + check = div.innerHTML = content; + if (check) { + if (xhr.status >= 200 && xhr.status < 400) { + var respObj = JSON.parse(xhr.responseText), + len = respObj.length, + i; + console.log(xhr.responseText); + content += ''; + content += ''; + for (i = 0; i < len; i++) { + content += ''; + content += ''; + content += ''; + content += ''; + if (i == len) content += '
CompanyFirst NameLast NameTitle
' + respObj[i].Company + '' + respObj[i]['First Name'] + '' + respObj[i]['Last Name'] + '' + respObj[i].Title + '
'; + } + div.innerHTML = content; + } else { + console.log('Connection to Server succeeded. Content was not received due to error.'); } - if (div.innerHTML != '') content = ''; - div.innerHTML = content; - } else { - console.log('Connection to Server succeeded. Content was not received due to error.'); } }; xhr.open('GET', 'files/jsonData.json', true); From d4275fe51bda08f030051d992880f8b8e425ea75 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 15:59:35 -0500 Subject: [PATCH 54/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index 9d72780..38b5b7f 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -5,7 +5,7 @@ function captureJSON() { xhr.onload = function() { var div = document.getElementById('capturedJSON'), content = '', - check = div.innerHTML = content; + check = div.innerHTML === content; if (check) { if (xhr.status >= 200 && xhr.status < 400) { var respObj = JSON.parse(xhr.responseText), From 60ffe66dae67b05a972e392d3b547c7e17c691e0 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 16:11:21 -0500 Subject: [PATCH 55/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index 38b5b7f..623e214 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -6,6 +6,7 @@ function captureJSON() { var div = document.getElementById('capturedJSON'), content = '', check = div.innerHTML === content; + console.log(check); if (check) { if (xhr.status >= 200 && xhr.status < 400) { var respObj = JSON.parse(xhr.responseText), From ffba87ed8778d05107eaceeed7774f3431ffd042 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 16:18:23 -0500 Subject: [PATCH 56/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index 623e214..b7096ff 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -22,11 +22,11 @@ function captureJSON() { content += '' + respObj[i].Title + ''; if (i == len) content += ''; } - div.innerHTML = content; } else { console.log('Connection to Server succeeded. Content was not received due to error.'); } } + div.innerHTML = content; }; xhr.open('GET', 'files/jsonData.json', true); xhr.send(); From 2aced40620a6f76be872f59bd95428e44038b31a Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 16:22:53 -0500 Subject: [PATCH 57/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index b7096ff..f70fb22 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -1,18 +1,16 @@ -console.log('jsonCap.js is running...'); +console.log('jsonCap.js has loaded...'); function captureJSON() { var xhr = new XMLHttpRequest(); xhr.onload = function() { var div = document.getElementById('capturedJSON'), content = '', - check = div.innerHTML === content; - console.log(check); + check = div.innerHTML == content; if (check) { if (xhr.status >= 200 && xhr.status < 400) { var respObj = JSON.parse(xhr.responseText), len = respObj.length, i; - console.log(xhr.responseText); content += ''; content += ''; for (i = 0; i < len; i++) { From b0b164c7679e5bf8a73971b5f45233e025c9c1bc Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 16:28:44 -0500 Subject: [PATCH 58/84] Update page.html --- ajax-requests/page.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ajax-requests/page.html b/ajax-requests/page.html index f664a99..535807c 100644 --- a/ajax-requests/page.html +++ b/ajax-requests/page.html @@ -5,6 +5,23 @@ +

Test different document types

From 2254c57f22b059c346dcc03ac69e24e68000dba9 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 16:29:41 -0500 Subject: [PATCH 59/84] Update page.html --- ajax-requests/page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax-requests/page.html b/ajax-requests/page.html index 535807c..60ba083 100644 --- a/ajax-requests/page.html +++ b/ajax-requests/page.html @@ -15,11 +15,11 @@ } table { margin-top: 12px; + border-collapse: collapse; } th, td { border: 1px solid black; - border-collapse: collapse; } From 8b1d05d1901144fde5c1d04d432a8a9fd7b06066 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 16:31:47 -0500 Subject: [PATCH 60/84] Update page.html --- ajax-requests/page.html | 1 + 1 file changed, 1 insertion(+) diff --git a/ajax-requests/page.html b/ajax-requests/page.html index 60ba083..221887f 100644 --- a/ajax-requests/page.html +++ b/ajax-requests/page.html @@ -19,6 +19,7 @@ } th, td { + padding: 4px 9px; border: 1px solid black; } From de09051292fcc3e57d579a8b545838c9f16d5212 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 16:37:19 -0500 Subject: [PATCH 61/84] Delete style.css --- ajax-requests/css/style.css | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 ajax-requests/css/style.css diff --git a/ajax-requests/css/style.css b/ajax-requests/css/style.css deleted file mode 100644 index 7d60573..0000000 --- a/ajax-requests/css/style.css +++ /dev/null @@ -1,15 +0,0 @@ -* { - font-family: Arial; -} -body { - margin: 24px auto; - width: 870px; -} -table { - margin-top: 12px; -} - -th, td { - border: 1px solid black; - border-collapse: collapse; -} From 57d8c5a48db07415935f7ccbc19de3d08b78be0a Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 16:38:18 -0500 Subject: [PATCH 62/84] Update page.html --- ajax-requests/page.html | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/ajax-requests/page.html b/ajax-requests/page.html index 221887f..03f8518 100644 --- a/ajax-requests/page.html +++ b/ajax-requests/page.html @@ -4,25 +4,7 @@ Ajax - - +

Test different document types

From ea7babd341240c2ef9bf8669243fddd799b23148 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 16:38:45 -0500 Subject: [PATCH 63/84] Create style.css --- ajax-requests/css/style.css | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 ajax-requests/css/style.css diff --git a/ajax-requests/css/style.css b/ajax-requests/css/style.css new file mode 100644 index 0000000..82678da --- /dev/null +++ b/ajax-requests/css/style.css @@ -0,0 +1,16 @@ +* { + font-family: Arial; +} +body { + margin: 24px auto; + width: 870px; +} +table { + margin-top: 12px; + border-collapse: collapse; +} + +th, td { + padding: 4px 9px; + border: 1px solid black; +} From bc89f58f6188bf7b50f745797c095fd3f6e19c7f Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 16:40:14 -0500 Subject: [PATCH 64/84] Update page.html --- ajax-requests/page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax-requests/page.html b/ajax-requests/page.html index 03f8518..856beb1 100644 --- a/ajax-requests/page.html +++ b/ajax-requests/page.html @@ -4,7 +4,7 @@ Ajax - +

Test different document types

From df35d95e86074157e459a4be412b4626948ad6dc Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 16:42:00 -0500 Subject: [PATCH 65/84] Update page.html --- ajax-requests/page.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ajax-requests/page.html b/ajax-requests/page.html index 856beb1..12fa26a 100644 --- a/ajax-requests/page.html +++ b/ajax-requests/page.html @@ -8,9 +8,9 @@

Test different document types

- - - + + +
From f3bf2467bd064cc36e87c81308bcda1434881193 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 16:45:02 -0500 Subject: [PATCH 66/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index f70fb22..de57652 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -3,7 +3,9 @@ console.log('jsonCap.js has loaded...'); function captureJSON() { var xhr = new XMLHttpRequest(); xhr.onload = function() { - var div = document.getElementById('capturedJSON'), + var btn = document.getElementsByTag('button')[0], + btnTxt = btn.textContent, + div = document.getElementById('capturedJSON'), content = '', check = div.innerHTML == content; if (check) { @@ -20,11 +22,13 @@ function captureJSON() { content += ''; if (i == len) content += '
CompanyFirst NameLast NameTitle
' + respObj[i].Title + '
'; } + btnTxt = btnTxt.replace('capture', 'hide'); } else { console.log('Connection to Server succeeded. Content was not received due to error.'); } } div.innerHTML = content; + btn.textContent = btnTxt; }; xhr.open('GET', 'files/jsonData.json', true); xhr.send(); From bddadcf49928ea60131340f2b4472b45c143a6ea Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 16:45:37 -0500 Subject: [PATCH 67/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index de57652..d9f4e1a 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -3,7 +3,7 @@ console.log('jsonCap.js has loaded...'); function captureJSON() { var xhr = new XMLHttpRequest(); xhr.onload = function() { - var btn = document.getElementsByTag('button')[0], + var btn = document.getElementsByTagName('button')[0], btnTxt = btn.textContent, div = document.getElementById('capturedJSON'), content = '', From d6c5c1608d338742600411bd82b6a8c93bc7e164 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 16:52:12 -0500 Subject: [PATCH 68/84] Update style.css --- ajax-requests/css/style.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ajax-requests/css/style.css b/ajax-requests/css/style.css index 82678da..de33e15 100644 --- a/ajax-requests/css/style.css +++ b/ajax-requests/css/style.css @@ -5,11 +5,13 @@ body { margin: 24px auto; width: 870px; } +button { + width: 320px; +} table { margin-top: 12px; border-collapse: collapse; } - th, td { padding: 4px 9px; border: 1px solid black; From b8a12a13c496f308aace452799dbfe5c009f6ce8 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 19:51:44 -0500 Subject: [PATCH 69/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index d9f4e1a..0d82fb7 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -26,6 +26,8 @@ function captureJSON() { } else { console.log('Connection to Server succeeded. Content was not received due to error.'); } + } else { + btnTxt = btnTxt.replace('hide', 'capture'); } div.innerHTML = content; btn.textContent = btnTxt; From 34c83467b6533ff34942277459557f8525ebd91a Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 19:52:54 -0500 Subject: [PATCH 70/84] Update style.css --- ajax-requests/css/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ajax-requests/css/style.css b/ajax-requests/css/style.css index de33e15..fe3dbbf 100644 --- a/ajax-requests/css/style.css +++ b/ajax-requests/css/style.css @@ -3,10 +3,10 @@ } body { margin: 24px auto; - width: 870px; + width: 920px; } button { - width: 320px; + width: 280px; } table { margin-top: 12px; From 40cb68b0e7586626c35a897d6cf6ffa92bbeb1cb Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 19:59:29 -0500 Subject: [PATCH 71/84] Update jsonData.json --- ajax-requests/files/jsonData.json | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ajax-requests/files/jsonData.json b/ajax-requests/files/jsonData.json index b0e8db8..65fe1d2 100644 --- a/ajax-requests/files/jsonData.json +++ b/ajax-requests/files/jsonData.json @@ -1,26 +1,32 @@ [ { - "Company": "CAROLINA LOGISTIC, INC.", + "Company": "CAROLINA LOGISTIC, INC", "First Name": "Valentin", "Last Name": "Khoroshkov", "Title": "Driver Payroll" }, { - "Company": "CAROLINA LOGISTIC, INC.", + "Company": "CAROLINA LOGISTIC, INC", "First Name": "Daniel", "Last Name": "Pilyev", "Title": "IT Manager" }, { - "Company": "CAROLINA LOGISTIC, INC.", + "Company": "CAROLINA LOGISTIC, INC", "First Name": "Bob", "Last Name": "Tumash", "Title": "Dispatcher" }, { - "Company": "CAROLINA LOGISTIC, INC.", + "Company": "CAROLINA LOGISTIC, INC", "First Name": "Kevin", "Last Name": "Bondarenko", "Title": "Insurance" + }, + { + "Company": "DELTA EXPRESS, INC", + "First Name": "Paul", + "Last Name": "Radchishin", + "Title": "Accounting" } ] From be75b4f96e9f891732efd523a5ff28e5ae90cc6f Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 20:04:16 -0500 Subject: [PATCH 72/84] Update page.html --- ajax-requests/page.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ajax-requests/page.html b/ajax-requests/page.html index 12fa26a..8ea6dec 100644 --- a/ajax-requests/page.html +++ b/ajax-requests/page.html @@ -9,8 +9,8 @@

Test different document types

- - + +
From 33f646925e925b3b3fffb939dfbedc10641f20c0 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Wed, 7 Nov 2018 20:07:07 -0500 Subject: [PATCH 73/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index 0d82fb7..8352940 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -14,12 +14,12 @@ function captureJSON() { len = respObj.length, i; content += ''; - content += ''; + content += ''; for (i = 0; i < len; i++) { content += ''; content += ''; content += ''; - content += ''; + content += ''; if (i == len) content += '
CompanyFirst NameLast NameTitle
First NameLast NameTitle
' + respObj[i].Company + '' + respObj[i]['First Name'] + '' + respObj[i]['Last Name'] + '' + respObj[i].Title + '
' + respObj[i].Title + '
'; } btnTxt = btnTxt.replace('capture', 'hide'); From a32ad90b7ec16ee8a5120abb6d1dcd21628396f3 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Thu, 8 Nov 2018 08:43:05 -0500 Subject: [PATCH 74/84] Update page.html --- ajax-requests/page.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ajax-requests/page.html b/ajax-requests/page.html index 8ea6dec..d2e84de 100644 --- a/ajax-requests/page.html +++ b/ajax-requests/page.html @@ -9,9 +9,10 @@

Test different document types

- +
+ From 4769e274f2870a17ec81fc25f942c3412fe40084 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Thu, 8 Nov 2018 08:48:16 -0500 Subject: [PATCH 75/84] Create xmlCap.js --- ajax-requests/js/xmlCap.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 ajax-requests/js/xmlCap.js diff --git a/ajax-requests/js/xmlCap.js b/ajax-requests/js/xmlCap.js new file mode 100644 index 0000000..bd448e2 --- /dev/null +++ b/ajax-requests/js/xmlCap.js @@ -0,0 +1,29 @@ + +console.log('xmlCap.js has loaded...'); + +function captureXML() { + var xhr = new XMLHttpRequest(); + xhr.onload = function() { + var btn = document.getElementsByTagName('button')[1], + btnTxt = btn.textContent, + div = document.getElementById('capturedXML'), + content = '', + check = div.innerHTML == content; + if (check) { + if (xhr.status >= 200 && xhr.status < 400) { + var data = xhr.responseXML, + c; + } + btnTxt = btnTxt.replace('capture', 'hide'); + } else { + console.log('Connection to Server succeeded. Content was not received due to error.'); + } + } else { + btnTxt = btnTxt.replace('hide', 'capture'); + } + div.innerHTML = content; + btn.textContent = btnTxt; + }; + xhr.open('GET', 'files/xmlData.xml', true); + xhr.send(); +} From e5dca1d640b8ab88858c657b49d002bd934b8b1c Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Thu, 8 Nov 2018 09:24:20 -0500 Subject: [PATCH 76/84] Update xmlCap.js --- ajax-requests/js/xmlCap.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ajax-requests/js/xmlCap.js b/ajax-requests/js/xmlCap.js index bd448e2..ec61747 100644 --- a/ajax-requests/js/xmlCap.js +++ b/ajax-requests/js/xmlCap.js @@ -11,8 +11,8 @@ function captureXML() { check = div.innerHTML == content; if (check) { if (xhr.status >= 200 && xhr.status < 400) { - var data = xhr.responseXML, - c; + var data = xhr.responseXML; + } btnTxt = btnTxt.replace('capture', 'hide'); } else { From 97eb59cc5a8cf07d1e1c049bdb42321c89ec31e6 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Thu, 8 Nov 2018 09:28:42 -0500 Subject: [PATCH 77/84] Create xmlData.xml --- ajax-requests/files/xmlData.xml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 ajax-requests/files/xmlData.xml diff --git a/ajax-requests/files/xmlData.xml b/ajax-requests/files/xmlData.xml new file mode 100644 index 0000000..0ab315e --- /dev/null +++ b/ajax-requests/files/xmlData.xml @@ -0,0 +1,32 @@ + + + Truck Diesel + FUEL + true + + + Reefer Diesel + FUEL + true + + + Scale + MISC + true + + + Lumper + MISC + false + + + Parts + MAINTENANCE + true + + + Cash Fee + FEES + true + + From 1b97f795866842b277d6e5c8f08bdbe530214829 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Thu, 8 Nov 2018 09:40:44 -0500 Subject: [PATCH 78/84] Update xmlCap.js --- ajax-requests/js/xmlCap.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ajax-requests/js/xmlCap.js b/ajax-requests/js/xmlCap.js index ec61747..d8da175 100644 --- a/ajax-requests/js/xmlCap.js +++ b/ajax-requests/js/xmlCap.js @@ -11,8 +11,16 @@ function captureXML() { check = div.innerHTML == content; if (check) { if (xhr.status >= 200 && xhr.status < 400) { - var data = xhr.responseXML; - + var data = xhr.responseXML.getElementsByTagNames('expense'); + content += ''; + content += 'File
for
Tax'; + for (var d = 0; d < data.length; d++) { + var checked = (data[d].childNodes[2].textContent == 'true') ? ' checked' : ''; + content += ''; + content += ''; + content += ''; + } + content += '
COMPANY EXPENSE
CategoryGroup
' + data[d].childNodes[0].textContent + '' + data[d].childNodes[1].textContent + '
'; } btnTxt = btnTxt.replace('capture', 'hide'); } else { From c9073a94a6163a742a2446ee7df30e0c81aaf485 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Thu, 8 Nov 2018 09:44:36 -0500 Subject: [PATCH 79/84] Update xmlCap.js --- ajax-requests/js/xmlCap.js | 1 - 1 file changed, 1 deletion(-) diff --git a/ajax-requests/js/xmlCap.js b/ajax-requests/js/xmlCap.js index d8da175..5990783 100644 --- a/ajax-requests/js/xmlCap.js +++ b/ajax-requests/js/xmlCap.js @@ -21,7 +21,6 @@ function captureXML() { content += ''; } content += ''; - } btnTxt = btnTxt.replace('capture', 'hide'); } else { console.log('Connection to Server succeeded. Content was not received due to error.'); From d423435159be752f1f617a5b838dab945ab844be Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Thu, 8 Nov 2018 09:46:45 -0500 Subject: [PATCH 80/84] Update xmlCap.js --- ajax-requests/js/xmlCap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ajax-requests/js/xmlCap.js b/ajax-requests/js/xmlCap.js index 5990783..ba6526b 100644 --- a/ajax-requests/js/xmlCap.js +++ b/ajax-requests/js/xmlCap.js @@ -11,7 +11,7 @@ function captureXML() { check = div.innerHTML == content; if (check) { if (xhr.status >= 200 && xhr.status < 400) { - var data = xhr.responseXML.getElementsByTagNames('expense'); + var data = xhr.responseXML.getElementsByTagName('expense'); content += ''; content += 'File
for
Tax'; for (var d = 0; d < data.length; d++) { From 9fb25b4c2203b8b2502fa6428fefdbdab77ccf49 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Thu, 8 Nov 2018 09:48:52 -0500 Subject: [PATCH 81/84] Update xmlCap.js --- ajax-requests/js/xmlCap.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ajax-requests/js/xmlCap.js b/ajax-requests/js/xmlCap.js index ba6526b..cfd4e1d 100644 --- a/ajax-requests/js/xmlCap.js +++ b/ajax-requests/js/xmlCap.js @@ -13,11 +13,11 @@ function captureXML() { if (xhr.status >= 200 && xhr.status < 400) { var data = xhr.responseXML.getElementsByTagName('expense'); content += '
COMPANY EXPENSE
CategoryGroup
'; - content += 'File
for
Tax'; + content += ''; for (var d = 0; d < data.length; d++) { - var checked = (data[d].childNodes[2].textContent == 'true') ? ' checked' : ''; - content += ''; - content += ''; + var checked = (data[d].childNodes[3].textContent == 'true') ? ' checked' : ''; + content += ''; + content += ''; content += ''; } content += '
COMPANY EXPENSE
CategoryGroup
CategoryGroupFile
for
Tax
' + data[d].childNodes[0].textContent + '' + data[d].childNodes[1].textContent + '
' + data[d].childNodes[1].textContent + '' + data[d].childNodes[2].textContent + '
'; From e271f5c290c69ff57230d7f88a5a6dc017c99bc8 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Thu, 8 Nov 2018 09:51:49 -0500 Subject: [PATCH 82/84] Update xmlCap.js --- ajax-requests/js/xmlCap.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ajax-requests/js/xmlCap.js b/ajax-requests/js/xmlCap.js index cfd4e1d..061e97a 100644 --- a/ajax-requests/js/xmlCap.js +++ b/ajax-requests/js/xmlCap.js @@ -15,9 +15,9 @@ function captureXML() { content += ''; content += ''; for (var d = 0; d < data.length; d++) { - var checked = (data[d].childNodes[3].textContent == 'true') ? ' checked' : ''; - content += ''; - content += ''; + var checked = (data[d].getElementsByTagName('company')[0].textContent == 'true') ? ' checked' : ''; + content += ''; + content += ''; content += ''; } content += '
COMPANY EXPENSE
CategoryGroupFile
for
Tax
' + data[d].childNodes[1].textContent + '' + data[d].childNodes[2].textContent + '
' + data[d].getElementsByTagName('category')[0].textContent + '' + data[d].getElementsByTagName('group')[0].textContent + '
'; From 6b4067376d0614574a11ac971d918456aabf4099 Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Thu, 8 Nov 2018 10:27:49 -0500 Subject: [PATCH 83/84] Update xmlCap.js --- ajax-requests/js/xmlCap.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ajax-requests/js/xmlCap.js b/ajax-requests/js/xmlCap.js index 061e97a..8cd291f 100644 --- a/ajax-requests/js/xmlCap.js +++ b/ajax-requests/js/xmlCap.js @@ -22,6 +22,8 @@ function captureXML() { } content += ''; btnTxt = btnTxt.replace('capture', 'hide'); + var rh = xhr.getAllResponseHeaders(); + console.log(rh); } else { console.log('Connection to Server succeeded. Content was not received due to error.'); } From da7840c6eaff7750892382a2a79957e6d36db04c Mon Sep 17 00:00:00 2001 From: Val <35149642+vkservicesllc@users.noreply.github.com> Date: Thu, 8 Nov 2018 10:28:15 -0500 Subject: [PATCH 84/84] Update jsonCap.js --- ajax-requests/js/jsonCap.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ajax-requests/js/jsonCap.js b/ajax-requests/js/jsonCap.js index 8352940..84c687b 100644 --- a/ajax-requests/js/jsonCap.js +++ b/ajax-requests/js/jsonCap.js @@ -23,6 +23,8 @@ function captureJSON() { if (i == len) content += ''; } btnTxt = btnTxt.replace('capture', 'hide'); + var rh = xhr.getAllResponseHeaders(); + console.log(rh); } else { console.log('Connection to Server succeeded. Content was not received due to error.'); }