How to update parent page with the events from iFrame

0
Hello, We are planning to use IFrame to show Mendix page in another Mendix page.  We have a requirement to refresh the parent mendix page with updated data when certain information changes in iFrame (Mendix page).  I am looking for suggestions on how we can implement it in Mendix. Thank you.  
asked
2 answers
1

You would have to implement window.postMessage functionality. In that manner a message can be sent from iFrame to parent window. When that is done (the event), make sure you add a listener to that event to get the data from the iFrame into your page content. See for instance:

https://stackoverflow.com/questions/19011780/communicating-cross-origin-from-parent-to-child-iframe

answered
0

Hi Rupesh,

Not sure if this is the best solution or if it would even work, but what if in your child page you use the javascript microflow button as your save button. Then you can write a script that clicks a button in your parent page. Then when the button is clicked a microflow will be triggered to save the data in the child page and then a button in the parent window would be clicked to trigger a microflow to make the necessary calls to update its information. 

 

I know this isn't an eloquent solution but I just cant think of an easier way to do that in Mendix. Hope this helps and I'm looking forward to other peoples suggestions!

answered