# POSTMESSAGE

#### 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nedyx.com/nedyx/clearlines-functions/import-export-functions/postmessage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
