Thunkable X - local path for WebViewer for Android

how do we call the filename is there any asset//:filename in the url or how?

just put asset name

1 Like

ok it worked but basic math functions in the html wont work why?

this is the link to the html code in w3schools

2 Likes

Need to check with a quick project and see if it works on my side.

3 Likes

It’s impossible to call assets within the html page from the phone

You need to do this via cdn

I tried your html file after adding it in my project and this is the view from my phone

Can you clearly point out what is wrong?

1 Like

@muneer Normally in w3schools html editor and viewer when you input a number in those text input boxes, the recommend sample size is supposed to change. But in thunkable it does not.

1 Like

Please explain futher i’m a novice

Will check and come back to you about the changes that should take place in the html page.

1 Like

Just made a quick test. It seems there is a problem preventing the JavaScript functions to run from the asset file.

However, if you run the same HTML from a URL it runs file.

I uploaded your file to a DTW folder
https://3ynihrnjb7v5zcebdgtvag-on.drv.tw/ThunkableTest/UserFiles/daniel_larry.html

And changed the URL of the Web Viewer to this URL and it worked OK.
image

Please check it this way and let me know.

1 Like

It’s Is possible to access assets with the webviewer like that at this time. You must use a cdn or other way to bring in external files.

Or

You can include the code in your HTML file.

Ok thanks

1 Like

Thanks sir, it works perfectly now

1 Like

Hi Thunkers,

I’m trying to upload a html file as an App. I’ve uploaded it as an asset and linked to the file in webviewer. It shows in the editor however not on my phone when I test it in the app, or as a WebApp. Any ideas?

Here is the project:
https://x.thunkable.com/copy/9e2b23503ce1b051955ce2868c60a350

1 Like

Can you provide more information?

If you are trying to use the HTML file from inside your app then you need to know that at the moment this option has a problem (at least in Android) and waiting to be fixed.

Yes I am trying to use the HTML file from the App assets however if there is another way to do it?

I saw that possibly it can be uploaded to github however when I tried to do this it would go to the directory page rather than opening the actual html code that I uploaded.

1 Like

For GitHub to act as a web page you need to create or choose a repository (folder) and then go to Pages tab and select this repository to be your web page.

1 Like

Thanks Muneer, that worked beautifully.

1 Like