# 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:** 2

<div class="post-metadata">

**Author:** ![jaythemanchs](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jaythemanchs/32/92809_2.png) [@jaythemanchs](https://community.thunkable.com/u/jaythemanchs)\
**Post date:** [June 25, 2021, 11:26am UTC](https://community.thunkable.com/t/how-to-send-receive-a-message-using-js/1363709/2 "2021-06-25T11:26:31Z")

</div>

Hi Luke,

You might have heard of this but just to confirm.

> **[thunkable/webviewer-extension](https://github.com/thunkable/webviewer-extension/)**
>
> Communicate between the Thunkable Web Viewer and a website - thunkable/webviewer-extension

An example of the code goes as such.  
**Send Message to Website**

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/b/fbeb2387281b2e234b1b3fa4b3b78e61cfbb6c72.png)

**Receive Message on Website**

```auto
ThunkableWebviewerExtension.receiveMessage(function(message) {
  // Do something with your message
  alert(message)
});

```

**Send a Message From Your Website to Thunkable**

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/3/13f95f3d157ed685b05e38d7f306232cfe19a0c7.png)

**Receive Message from Website**

```
ThunkableWebviewerExtension.postMessage('hello world');

```

Happy Coding,

Jay

---

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