0

In a Javascript file scripts.js, how do you send a variable called place which contains information about a place (e.g. name, location, rating) to a Flask Python application.py.

0

getJSON. Use search in pset8:script.js as your guide (or perhaps even your own addMarker from the same exercise).

The thought being, sending place in a query string (think: request.args) to a route in application.py. Much the same way search uses parameters to send the query string (ostensibly &q={query}) to the search route. The data returned to the script can be as simple as a success/failure indicator.

| improve this answer | |
  • isn't that for receiving a variable in javascript - how do you send one in javascript? – M. Alex Aug 27 '18 at 14:14
  • added more context to answer. Remember, this forum is CS50-centric. Perhaps searching for similar on stack overflow would cast a wider net. – DinoCoderSaurus Aug 27 '18 at 15:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .