# How to send/receive a message using js

**URL:** https://community.thunkable.com/t/how-to-send-receive-a-message-using-js/1363709
**Category:** Questions about Thunkable X
**Created:** [June 25, 2021, 11:12am UTC](https://community.thunkable.com/t/how-to-send-receive-a-message-using-js/1363709 "2021-06-25T11:12:19Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [June 25, 2021, 3:16pm UTC](https://community.thunkable.com/t/how-to-send-receive-a-message-using-js/1363709/11 "2021-06-25T15:16:25Z")

</div>

Can you start with a vanilla setup.

```auto
<!DOCTYPE html>
<html>
<head>
<script 
    src="https://thunkable.github.io/webviewer-extension/thunkableWebviewerExtension.js"
    type="text/javascript">
</script>
</head>

<script>
    const textData = "This is from my page";
    ThunkableWebviewerExtension.postMessage(textData);
});
</script>
</html>

```

See if this works then you know it is not the extension. If you save if to .html file and call it from your `web viewer` it should give you the result in the `receive message` event.

---

_[View the full topic](https://community.thunkable.com/t/how-to-send-receive-a-message-using-js/1363709)._
