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 ...
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" ...
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>&...
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(...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
pset8 × 7getjson × 7
addmarker × 4
javascript × 2
cs50x × 1
final-project × 1
google-maps-api × 1
articles.php × 1
console × 1