443
Views
3
Comments
Cross Origin issue in I-frame
Question

Hi All,

Task : Open external url in iframe using modal popup in outSystems

Error : We found error "Cross origin" Please refer attach screen shot

2025-04-23 09-24-58
oDevFagundes
Champion

Hi

The image doesn't show up.

I'm thinking that problem is happening because your iframe belongs to another host.

If you have the control about that other page, maybe you can allow it there.

UserImage.jpg
Gokul Hirani

PAULO RICARDO FAGUNDES JUNIOR wrote:

Hi

The image doesn't show up.

I'm thinking that problem is happening because your iframe belongs to another host.

If you have the control about that other page, maybe you can allow it there.

Hi

Please check again


2022-02-21 18-52-02
Carlos Lopez

Hi Gokul


This is not an Outsystems issue, it's a web security one. In order to prevent XSS attacks, the browsers block access to an iFrame created on JS (which is how the modal is built and displayed i believe) when the iFrame origin differs from the parent domain. 

In order to work around this, I'd suggest doing a window.open on the link click to open the page on a new tab (I know this is not exactly what you wanted, but it's a workaround). You could also get the page HTML and show it on a traditional Outsystems pop-up via an unescaped expression.


Regards,

   CLSJ

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.