Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 6 - script source not found #5

Open
lucasArena opened this issue Nov 5, 2017 · 3 comments
Open

Chapter 6 - script source not found #5

lucasArena opened this issue Nov 5, 2017 · 3 comments

Comments

@lucasArena
Copy link

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
Copy link
Author

//HTML
<!doctype html>

<title>Mighty Gumball</title> <script src="mightygumball.js"></script>

Mighty Gumball Sales

<script src="http://gumball.wickedlysmart.com/?callback=updateSales"></script>

//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);

}

}

@bethrobson
Copy link
Owner

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

@luc122c
Copy link

luc122c commented Apr 17, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants