1

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

1 Answer 1

3

The devil hides in details. I forgot to put "" between {{ url_for..... }}

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.