I am just getting started into python and flask (for the raspberry pi). I want a web application that would execute some python code to pan and tilt a camera and display a v
I've got the same problem, and the answer is simple using ajax XmlHttpRequest:
// send a request, but don't refresh page
xhttp = new XMLHttpRequest();
xhttp.open("GET", "your script action", true);
xhttp.send();
Here's a small example, calling current script with parameters "like", embedded in a function:
function likeStuffs()
{
// send a request, but don't refresh page
xhttp = new XMLHttpRequest();
xhttp.open("GET", "?like", true);
xhttp.send();
}