POSTMESSAGE

Sends a message to current browser page.

Syntax

POSTMESSAGE(message)

  • message - the text message which should be sent to the browser page - Value type: text

Remark

  • The message is sent to the browser page after the current formula evaluation has been completed.

  • The parent page should have a windows.addEventListener function to receive this message (see example below).

Example

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>

Instead of the console.log function you could add any custom code to process message in the expected way.