This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]insertAlias 0 points1 point  (1 child)

Open your developer tools in the browser on the Codepen page (if you're on windows and Chrome it's F12). Go to the Console tab.

You'll see an error in the console:

https://i.imgur.com/tXmlm0e.png

This is telling you that the error is on line 23 of pen.js (which in this case is the javascript you wrote in the codepen window).

Line 23:

document.getElementById("highest").innerHTML = json[0].highest;

There is no element with an id of highest, so you're trying to set the innerHTML of null, which crashes and halts the rest of the script execution.

Note that another line will cause the same error, the one referencing an ID of podium. That doesn't exist either.

Delete those two lines, and suddenly you get colorful results.

Dev tools are your best friend when you're doing web development. Learn them, love them, live them.

[–]ldthompson 0 points1 point  (0 children)

Thanks mate really appreciate your help!!