248
Views
4
Comments
can i detect iframe behavior and passing data to parrent in mobile?

can i detect iframe behavior (like form input or something like confirm purchasing from web) and passing data to parrent in mobile?


Thank you in advance

2021-04-21 23-06-46
Jeanene Williams

Is the iframe on the same domain?

I just did a component to pass messages between an iframe and its parent. Just having problems getting it working on the forge at the moment :)


2018-04-20 04-21-16
Agus Kukuh Setiaji

John Williams wrote:

Is the iframe on the same domain?

I just did a component to pass messages between an iframe and its parent. Just having problems getting it working on the forge at the moment :)


Hi John, iframe is not in the same domain


2021-04-21 23-06-46
Jeanene Williams

That gets harder then because the browser security will complain about cross domain security errors. You can try my component but I don't think it will work for you.

If you want to try use the attached application, put the webblock on the parent page and then use the SendMessage action on the child page. Or if the child isn't an Outsystems page just take the javascript that the sendmessage is using and put that on the page. But I suspect you will get a cross domain error.

iFrameComms_CR.oml
2021-04-21 23-06-46
Jeanene Williams

If you want to just read content of the iframe from your window rather than passing a message from the child to the parent then you will need to do it in javascript and this post may help


https://stackoverflow.com/questions/364952/jquery-javascript-accessing-contents-of-an-iframe


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