Hot answers tagged

2 votes
Accepted

pset8- AddMarkers, not even working to for a simple console.log() test

You told the program to "get" info from "articles" here $.getJSON(Flask.url_for("articles")) but you didn't tell it what to GET. Assuming your articles function returns data as per the examples (eg ...
user avatar
1 vote
Accepted

pset8 getJSON syntax info needed

The jQuery doc for getJSON says it takes a url as an argument. (First hit with "jquery getJSON" search using Google). The flask doc for url_for (first hit from internet search for "flask url_for" ...
user avatar
1 vote
Accepted

Pset8 Articles.php returns 'undefined' as link and title values

Syntax mistake in this loop: for (var key in data) { if (data.hasOwnProperty(key)) { content += "<li><a href=\"" + data['link'] + "\" >" + data['title'] + "</a>&...
user avatar
1 vote
Accepted

trouble with addMarker in pset8. getJSON seems to work but I'm not getting results

When you first click the marker, the .done() function hasn't delivered your JSON data yet, thus content will still be "" when you call showInfo(marker, content); at the very end. Try to move showInfo(...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible