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

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

#1

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?


#2

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


#3

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).


#4

Thanks aleave! Your suggestions were helpful.