Issue with .innerHTML, When tested on Scrimba, it says error in setting attributes to null bu |
Issue with .innerHTML, When tested on Scrimba, it says error in setting attributes to null bu |
dkar_0029 |
Nov 17 2021, 01:40 PM
Post
#1
|
Group: Members Posts: 5 Joined: 17-November 21 Member No.: 28,175 |
I want to replace the "No students enrolled" with the output from displayStudents(testArray) when it runs. I have attached the .js and .html files for reference.
Thanks! Attached File(s) assignment_1a.zip ( 1.48k ) Number of downloads: 206 |
Christian J |
Nov 17 2021, 03:51 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,661 Joined: 10-August 06 Member No.: 7 |
Could it be due to
CODE studentEnrolSummaryRef.innerHTML = displayStudents(studentList); that uses the empty studentList array? |
dkar_0029 |
Nov 17 2021, 04:06 PM
Post
#3
|
Group: Members Posts: 5 Joined: 17-November 21 Member No.: 28,175 |
Could it be due to CODE studentEnrolSummaryRef.innerHTML = displayStudents(studentList); that uses the empty studentList array? Nope, I have been testing a simplified version that doesn't work either Attached File(s) Simplified.zip ( 1.18k ) Number of downloads: 189 |
dkar_0029 |
Nov 18 2021, 12:28 AM
Post
#4
|
Group: Members Posts: 5 Joined: 17-November 21 Member No.: 28,175 |
Could it be due to CODE studentEnrolSummaryRef.innerHTML = displayStudents(studentList); that uses the empty studentList array? Nope, I have been testing a simplified version that doesn't work either UPDATE - I FOUND IT! Attached thumbnail(s) |
Christian J |
Nov 18 2021, 10:44 AM
Post
#5
|
. Group: WDG Moderators Posts: 9,661 Joined: 10-August 06 Member No.: 7 |
UPDATE - I FOUND IT! That doesn't explain the javascript errors though, a broken path to the JS file would prevent the script from running at all. I wouldn't worry about Scrimba though, use your web browsers' developer tools instead (both Firefox and Chromium-based). And like Brian said, methodical debugging is the key... |
Lo-Fi Version | Time is now: 27th April 2024 - 02:03 PM |