X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fckeditor%2Fplugins%2Fwsc%2Fdialogs%2Fciframe.html;fp=httemplate%2Felements%2Fckeditor%2Fplugins%2Fwsc%2Fdialogs%2Fciframe.html;h=8e4e6bc9a5329f7fdea8937a2c1cc206b428d249;hb=c94eff6021ef963f08f67da501e756d53a61c50d;hp=292297d70e2c3360c966d7d705376d367a67840f;hpb=0736a91a87c46f7097ddef9782ddbb59a0ce3304;p=freeside.git diff --git a/httemplate/elements/ckeditor/plugins/wsc/dialogs/ciframe.html b/httemplate/elements/ckeditor/plugins/wsc/dialogs/ciframe.html index 292297d70..8e4e6bc9a 100644 --- a/httemplate/elements/ckeditor/plugins/wsc/dialogs/ciframe.html +++ b/httemplate/elements/ckeditor/plugins/wsc/dialogs/ciframe.html @@ -1,6 +1,6 @@ @@ -38,9 +38,26 @@ function sendData2Master() catch (e) {} } +function OnMessage (event) { + var message = event.data; + var destination = window.parent.parent; + destination.XDTMaster.read( [ 'end', message, 'fpm' ] ) ; +} + +function listenPostMessage() { + if (window.addEventListener) { // all browsers except IE before version 9 + window.addEventListener ("message", OnMessage, false); + }else { + if (window.attachEvent) { // IE before version 9 + window.attachEvent("onmessage", OnMessage); + } + } +} + function onLoad() { interval = window.setInterval( sendData2Master, 100 ); + listenPostMessage(); }