Head-First-HTML5 icon indicating copy to clipboard operation
Head-First-HTML5 copied to clipboard

Chapter 6 - script source not found

Open lucasArena opened this issue 7 years ago • 3 comments

I'm having some issue, with the jsop, because when i put the script with the src="gumball.wickedlysmart.com/?callback=updateSales" the browser's console says me this:

GET http://gumball.wickedlysmart.com/?callback=updateSales net::ERR_NAME_NOT_RESOLVED

I think the url isn't available any more. Is there anyone can help me?

lucasArena avatar Nov 05 '17 22:11 lucasArena

//HTML

Mighty Gumball

Mighty Gumball Sales

//JavaScript /* mightygumball.js */

window.onload = function () {

};

function updateSales(sales) { var salesDiv = document.getElementById("sales"); for (var i = 0; i < sales.length; i++) { var sale = sales[i]; var div = document.createElement("div"); div.setAttribute("class", "saleItem"); div.innerHTML = sale.name + " sold " + sale.sales + " gumballs"; //salesDiv.appendChild(div);

}

}

lucasArena avatar Nov 05 '17 22:11 lucasArena

Hi Yes, Lucas, we are working on getting the gumball.wickedlysmart.com service restored, until then this code won't work! Sorry about that.

bethrobson avatar Nov 05 '17 23:11 bethrobson

Is there any chance of getting an SSL certificate for the example domain? You can pick them up for free from LetsEncrypt. Currently, JSONP requests to this URL from a secure origin (https://) will fail due to the mixed content policy.

luc122c avatar Apr 17 '19 12:04 luc122c