I have a greasy smipe, which opens an iframe as the original page from a different subdomain.
I would like to refresh the original page when after submitting the form iframe refresh
I am at the point where I can execute the function when the iframe is refreshed, but I can not get that function to affect parent document.
I understand that this browser is due to the security model, and I am reading using the post message to communicate between two windows, but I can not seem to know that mother How to reload the call with the father.
There is some advice on how to do this but it will be very useful
thanks
Use:
window.parent.postMessage ('Hello Parental Frame!', '*');
Note '' 'indicates "any original" if possible, you should change it with a targeted source.
In your original frame, you need it:
window.addEventListener ('message', receiveMessage, false); Function Received Messages (EVT) {if (evt.origin === 'http://my.iframe.org') {Warning ("Message found:" + evt.data); }}
Replace "my.iframe.org" with the original of its iframe. (You can leave the original verification, just be very careful what statistics you get).
Comments
Post a Comment