Hello,
I am trying to postMessage to the parent and can't make it work.
I tried to manipulate it in many ways, here is the last try, that also doesn't work.
Will appreciate any kind of help.
Thanks

This is the receiver:
Code:
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
   <title>receiver</title>
</head>
<body>

<iframe id="receiver">
   <script type="text/javascript">
   	  window.addEventListener('message', receiveMessage, false);
	  
       function receiveMessage(evt) 
       {
           alert("got message: " + evt.data);
       }

   </script>
   
      <iframe id="sender" src="./sender.html"></iframe>


</iframe>

<div>Please wait..</div>
</body>
</html>
And here is the sender:
Code:
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>sender</title>
</head>
<body>
<div>sender..</div>

    <script type="text/javascript">
        var id= "12345667";
		var o = parent.getElementById('receiver');
        o.postMessage(id, '*');

    </script>
</body>
</html>
\