Head-First-HTML5
Head-First-HTML5 copied to clipboard
Chapter 6 - script source not found
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?
//HTML
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);
}
}
Hi Yes, Lucas, we are working on getting the gumball.wickedlysmart.com service restored, until then this code won't work! Sorry about that.
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.