Webviewer Drop-down menu production

Can I use js code in thunkable with the data transfer function of the webviewer component to create a drop-down menu?
Does anyone know how to teach me?

1 Like

well, it depends upon you that how you want to get teached.

1 Like

Can you tell me how to write the js drop-down menu and how to pass data to the webviewer?

There are lots of tutorials on building dropdown menus in javascript. You should be able to find one by googling. :slight_smile:

Getting the webviewer communication needs the code found here: GitHub - thunkable/webviewer-extension: Communicate between the Thunkable Web Viewer and a website - there are examples. Try it out and post again if you have questions! I’ve done it (the webviewer part, not the javascript part), can probably answer your questions if you get stuck.

1 Like
3 Likes

Create a drop down menu where? In the webpage or in Thunkable?

Anyway, both are doable and easy but you need to explain what you want clearly so others can guide you.

Use the webviewer component to display the drop-down menu in the thunkable, use the function of sending communication messages to the web page, change the menu items, and select the completed report to report the selected item.

https://ycyprogram.neocities.org/thunkable/drop-down-menu.html
This kind of drop-down menu.
Can the data be transferred to the web page when it is loaded, the data in the drop-down menu is the transfer list, and the selection is completed is the return selection item.

Source code:
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=big5">
</head>

<body>
<h1>Drop-down menu </h1>
<hr>

<form>
<select id=theList size=5>
<option value=1>1
<option value=2>2
<option value=3>3
<option value=4>4
</select>
</form>
<hr>
</body>
</html>
Can be rewritten with this

Yes - you’d need javascript on the web server to receive the information about categories from the app (using the thunkable extension I linked above) AND to use the message received to create that form section. My Javascript skills are marginal enough and it’s bedtime for me, so I’m going to hope someone else with better skills wanders along and helps you with this. :slight_smile:

You should also watch Jared’s all-Thunkable solution above. I think that what you want can be accomplished with just Thunkable, but maybe I don’t understand what you’re trying to do well enough.

1 Like

I could set up the JavaScript for a small fee! If you want to, send me a DM. I can prepare it first and demonstrate it’s working too.

3 Likes