Answer the question
In order to leave comments, you need to log in
How to set up two way communication between flask and JS?
I can't find a solution to my problem anywhere. There is a simple form in HTML. JS handles it. At one stage of validation, you need to pass the value from the form to Python, process it there, and return the value back to JS for further validation in JS. Be sure to do it through FLASK.
Answer the question
In order to leave comments, you need to log in
1. Write an API in Flask. There are a lot of articles on the Internet, for example this one .
2. From your JS script, you access the API, for example, using fetch .
3. Satisfied with the result.
I can't find a solution to my problem anywhere
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question