I have a SmartCapture form created in a cloudpage. Whenever a person fills the form and submit, it will capture information and redirect to a thankyou page (also a cloudpage).
It works well until I embed the form into an external site by
<iframe> tag. The information still can be captured but the form doesn't redirect to the target page. Seems like it was blocked
Here is the error I got from the browser console.
smartcapture-formjs.js:516 Uncaught DOMException: Blocked a frame with origin "https://example.com" from accessing a cross-origin frame. at success (https://mc.s10.exacttarget.com/CloudPages/lib/smartcapture-formjs.js:516:27) at Object.success (https://mc.s10.exacttarget.com/CloudPages/lib/smartcapture-formjs.js:29:16) at j (https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js:2:27309) at Object.fireWith [as resolveWith] (https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js:2:28122) at x (https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js:5:22111) at XMLHttpRequest.b (https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js:5:26030)
Disable Same Origin Policy in the external site is not a choice since the page can't be disabled alone.
I was told that I should try to fix the smartcapture page with the function
window.parent.postMessage(). To be honest, I have no idea how this can work in this case and where I can put the function..
Anyone who has encountered this issue, please let me know how to handle this. Really appreciate with any help.