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
muneer
January 31, 2022, 9:41am
2
You can accomplish this by using Web Viewer Extension
.
See this
Communicate between the Thunkable Web Viewer and a website
See this one of my examples
I made a simple JavaScript code to get the date after certain number of days.
[image]
This is giving today’s date but if I add some days I get the future date in the label.
[image]
All managed by a web viewer extension running .html file added to the project as an asset…
The Google sheet solution is still a viable solution and it works just as good.
This is the blocks of the project
[image]
This is the JavaScript Code
<!DOCTYPE html>
<html>
<head>
<script src="https://thunkable.github.…
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
muneer
February 2, 2022, 10:13am
5
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
I added a button to the screen and have this code in the button click
block
When I test my project, I first see this
When I click the button, the web page will show whatever name I pass to it.
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
muneer
February 2, 2022, 1:28pm
7
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" ......
system
Closed
May 16, 2022, 5:16pm
11
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.