Reputation:
I want to pass a token to a route from my script tag but cant find a way to make this work.
So far I have made this:
<script>
some code...
window.location.href = {{ url_for ("payment_success", token=token ) }};
</script>
But it's not returning anything. All my routes are ok. I don't have really much idea about javascript. Thanks in advance
Upvotes: 1
Views: 161
Reputation:
The devil hides in details. I forgot to put "" between {{ url_for..... }}
Upvotes: 3