Add this script tag to your parent page to receive the message which has been sent by the POSTMESSAGE function:
<script >
function handleMessage(event) {
// Log the received message
console.log('Received message:', event.data);
}
window.addEventListener('message', handleMessage);
</script>