Javascript doesn´t work

Hello all,

I wanted to know if Javascript works in the WebViewer of the Thunkable X Platform. It doesn´t look like it works because I get the error 101 when trying to use javascript.
I wanted to use Taifun´s Tutorial how to inject text into the website and click a button using Javascript because it is, as far as I know, the only option to encrypt/decrypt text with AES in the Thunkable X Platform.

I use these blocks:

Thank you for your help


use data URI.



I tried this approach but I’m not quite sure if I did something wrong or if this doesn’t work in thunkable X.

Here’s a link to the project, if you can help. I need to run JS in Thunkable to include a JS UUID generator:

ahhh…I did a typo. works fine if typed correctly. Thanks!

1 Like

At the same designer link, I’m trying to update your sample code to produce a new uuid on button click.

I don’t know if I’m making a typo or have a misunderstanding of nested JS functions and variable declaration/scope …or both.

Your help is appreciated!

Here are 3 working examples of the app interacting with JavaScript. The js file could be hosted locally I believe and the concept still work.

An expanded example of above


Is there a way to generate an Object ID (similar to UUID) from within x.Thunkable for use with a POST API call to a MongoDB (_id)?
I know that if the _id is NOT present, Mongo creates one for me, but I need this _id to continue with a PUT statement.

Any help would be appreciated.

1 Like

Create a local table using the Data Sources option and whenever you need a UUID just create a row in the local table and get the UUID from it.

You should already have the ID if you are making a PUT call., else, you wouldn’t know what you were PUTing.