Replacing dmxRouting.js file with the new one provided.
I tried this with the previous approach with the script block in the content page. Same error.
I tried this with the suggested approach of creating a js file with the script block and then loading that as an include, following Teodor’s instructions. I tried placing the include in the content page AND the layout page as per Teo’s instructions. I also tried placing the include in the header. Same error whatever I try.
None of these have worked, please advise where to from here?
Hi @patrick - I placed this at the bottom of the content page - and then clicked on the link to take me to the page - the alert fired before redirected to the page, but when I close the alert it then redirects me.
I assume that's the desired outcome? Or it fires too soon even?
I don't think that's the issue, the issue seems to be trying to run the JS file from the FLOW.
As long as it shows the alert it seems to run the script inside the content page, so that is good. But we still don’t know why it doesn’t work with the runStripe function.
Next we could try following script block:
<script>
function runStripe() {
alert('Script works');
}
</script>
You the run the function using the flow and see if it shows the alert.
@patrick it’s working!! It looks like your fix actually did work - as I was testing a million different ways to use FLOW - I left a typo in the correct runStripe function command. I’ve reverted it all back to the script block in the bottom, and with your fix this is now redirecting to Stripe. Thank you!!!