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

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -