<script type="text/javascript"> if ( window.attachEvent ) { window.attachEvent('onmessage',function(e) { document.getElementById("msg").value = e.data; document.getElementById("origin").value = e.origin; }); } else { window.addEventListener('message',function(e) { document.getElementById("msg").value = e.data; document.getElementById("origin").value = e.origin; }, false); } </script> <input type="