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

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 :)


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


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.

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