How to insert an input text into a webpage

hi guys
first of all, I am sorry as I am new and beginner, I am trying to build an app that gets access details from firebase to insert the text in the webpage at a specific portion using ID/String

for instance:
I have a premium account and I would like customers to access a premium account without knowing the username and password, the data fitched from firebase and inserted in the login section and login successfully

sorry for my bad English and poor description

Thanks for your support

1 Like

You can accomplish this by using Web Viewer Extension.

See this

See this one of my examples

Thanks for your reply @muneer, but still, I do not understand how to insert text on the webpage… if you can help in showing any login example, I will be really thankful for your support

1 Like

@muneer Could you please help if its possible, thanks in advance

1 Like

Did you see what I have sent you. There were 2 examples, one from Thunkable and one by me.

Anyway,
Let me take you through a simple scenario.
Suppose you have this html file already in your website.

<!DOCTYPE html>
<html>
<head>
<script src="https://thunkable.github.io/webviewer-extension/thunkableWebviewerExtension.js" type="text/javascript"></script>
</head>
<body>
    <h1>Welcome to Thunkable</h1>
    <p id="demo"></p>
<script>
  ThunkableWebviewerExtension.receiveMessage(function(message) {
    document.getElementById("demo").innerHTML = "Hello <strong>" + message +"</strong>";
});
</script>
</body>
</html>

In your Thunkable project, you need a Web Viewer component with the URL pointing to your HTML file
image

I added a button to the screen and have this code in the button click block
image

When I test my project, I first see this
image

When I click the button, the web page will show whatever name I pass to it.
image

Hope this makes it clear to you.

1 Like

Thanks, @muneer, last time even I saw this topic, but it wasn’t easy if the website is public anyway I will try to implement but I am sure it won’t work

1 Like

Whether the website is public or private has no real effect in the solution.

All you need is a site that you can edit the pages not a website that you have no control over.

1 Like

@muneer thanks for your feedback… I found a similar topic previously posted but seems was not possible to use X Thunkable Using Javascript in webviewer? - #6 by franco_amato

if it’s a public website how its possible to add this below line in HTML!!

<script src="https://thunkable.github.io/webviewer-extension/thunkableWebviewerExtension.js" ......

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.