javascript - Sending Message to a iFrame using postMessage from parent? -


is there way send postmessage iframe parent window? know how can send iframe parent, need send response message after parent receives it.

edit--------------- have following.

parent window: function toframe(type, data) {     $("iframe[data-atdl='schedule']").contentwindow.postmessage({         type: type,         data: data     }, "*"); } 

iframe:

window.addeventlistener("message", fromparent, false);  function fromparent(e) {         var data = e.data.data;         var type = e.data.type;          sendparentdata("alert","action " + type + " :: " + data);     } 

~z


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -