You are viewing limited content. For full access, please sign in.

Discussion

Discussion

Modern Forms Designer - Using window.location.replace is being flagged for cross origin

posted on July 22 Show version history

I was using this method to redirect to a payment vendor's secure site and it was working when on the classic forms designer, but when I switched to the modern forms designer I started getting flagged for cross origin.

Since the user has already interacted with a web request button to generate the payment URL I do not want to ask them to click a hyperlink in order to proceed, that is confusing UI design.

After the web request is executed by clicking the button provided when adding a web request to a form, we want to direct them to the payment vendor's website keeping the URL visible at all times rather than in an iFrame where they can not see the domain.

The vendor then will pass them back to the secure app.laserfiche.com website after payment is completed and they can always check their URL to see where they are.

The error is 

Cross-Origin Request Blocked:  (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 404.

0 0
replied on July 23

Modern form custom script runs in iframe sandbox and does not allow change top navigation.

If you use window.open(url, '_blank') to open in a new tab it should work.

0 0
replied on July 24 Show version history

No luck with this, it does not do anything at all. We do need to stay in the same tab when taking payments though, new tabs would be if you want to visit a new site and keep the existing one open. When you make a payment with a payment vendor you go to that domain to charge your credit card then you are returned to your domain with transaction confirmation data.

 

window.open('https://www.google.com', '_blank');

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.