I want to send variable data form html to flask
This is my html js code.
I can not send that variable data to the flask in that way.
<script>
var data = "shan";
window.location.href='{{ url_for( "move_forward" , title=data) }}';
</script>
But when I used below way I can send it
<script>
window.location.href='{{ url_for( "move_forward" , title="shan") }}';
</script>
But finally I want to assign some value to the variable and I want to send it to the flask.
How can I do it
@app.route("/move_forward/<title>", methods=['GET', 'POST'])
def move_forward(title):
print(title)