Ajax and Weather Viewer Help

Still not getting a readable response from console. I’m getting an Error: promised response blah blah blah something went out of scope.

Error: Promised response from onMessage listener at init@moz-extension://e4c523a9-9034-449c-95d8-4651fc3bbf59/dist/background.js:8:1517636 went out of scope undefined
console_runner-ce3034e6bde3912cc25f83cccb7caa2b0f976196f2f2d52303a462c826d54a73.js:1
Error: Promised response from onMessage listener at init@moz-extension://e4c523a9-9034-449c-95d8-4651fc3bbf59/dist/background.js:8:1517636 went out of scope

Also, no json data is displayed in the console.

That shows up after I hit the allow location for Firefox.

59.0.3 32 bit. How did you get the console inside the codepen webpage?

Randell I hope we meet in real life sometime so I can shake your hand and buy you a beer. Thank you sir. I’ll try to get it from here and update this if I get stuck again. (more than likely)

1 Like

Any idea why data.weather.description would return a undefined?

Figured it out! On to the background picture next. Thanks again for this loooooong help session. It’s appreciated.

Would you mind looking at my pen one last time? I’m trying to update the background-image with the icon url and can’t seem to get the syntax right. I’m going off this: https://www.w3schools.com/jquery/jquery_css.asp

If you look at your browser’s console, you will see an error that says:

Uncaught ReferenceError: url is not defined

That is because when you write ulr(background), only background is a variable. The rest needs to be a string. So you must write:

$(".flex-container").css("background-image", "url(" + background + ")");

EDIT: To prevent the background image from repeating, your css should have:

.flex-container{
	background-repeat: no-repeat;
}
1 Like

Got it! Thanks again. Now CSS it till’ it’s pretty.