FCC Weather Viewer App: Why won't my element's innerHTML change? <SOLVED>

Project Link: http://codepen.io/teknoformula/pen/Npgezr

I am trying to change the HTML of #weatherDisplay and #location to display their corresponding JSON key-value pairs.

For #weatherDisplay, I want to change the HTML to change to data2.main.temp.

For #location, I want to change the HTML to show the city name as captured by data2.name.

I have used the Document.getElementById( ).innerHTML method to try to select them, but they do not change.

Am I using the wrong method to make these changes?

try with innerHTML instead of innerhtml, the code is case sensitive

Hi, check out my fork, it works now. You are very close to a solution but you are using innerhtml instead of innerHTML. Also, openW needs to be defined outside the scope of the first API call to be accessible by the second api call (I made it a global variable).

1 Like

Thanks aleave! Your suggestions were helpful.