[Solved] Write the html in the Web_Viewer

hi all

i want to show html code in the Web_Viewer ( i know that i can to upload the html file to my Files in thunkable and then show it in the Web_Viewer )

what i need is something like this

is that posable to do ?
the reason why i need it like this … because i need to change the src=“https://www…”
to the Url will user post it in the text _input

this my html code fro example :

 <!DOCTYPE html><html><meta name="viewport" content="initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,width=device-width, user-scalable=no" /><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><body><iframe width="100%" height="315" src="https://www.youtube-nocookie.com/embed/ZdsddmOvu5E" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></body>

THANK YOU

1 Like

I think the URI schema is not fully supported by iOS so your code could have problems.

1 Like

try -
data:text/html, + <!DOCTYPE html><html><meta name="viewport" content="initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,width=device-width, user-scalable=no" /><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><body><iframe width="100%" height="315" src="https://www.youtube-nocookie.com/embed/ZdsddmOvu5E" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></body> (Full code including the <!DOCTYPE tag)

1 Like

Can you try it without the newline block @bader_mouti ?

1 Like

This would be a new expected behavior wouldn’t it?

iOS devices didn’t display this as html content for some time. Charts for example in 2019/2020 on android in a Thunkable app could be produced this way but not iOS.

2 Likes

hi muneer thank you for your replay
do you mean that when my app is publish the code will not work ??

hi luv.ak.tech thank you for your replay

its not working

hi domhnallohanlon thank you for your replay

i tried its not working

hi jared thank you for your replay
IOS Very complicated and there are many things thatthay does not accept :sweat_smile:

1 Like

I’m working on a solution for you, if it works, I’ll post it.

1 Like

thank you @muneer you are amazing

1 Like

Can you test this for me

put this in the URL of your web viewer
sample url

You can change the site name after ?showURL= and test that you can change the site every time.

2 Likes

thank you so much muneer this way will work for me better than what i was looking for

can you pleas let me now how you did this

1 Like

Is that a coors anywhere proxy?

1 Like

I will send you the code tomorrow. It’s midnight my time and my computer is already switched off.

1 Like

okay thank you so much

1 Like

JavaScript retrieving the URL parameters and updating the iFrame property programmatically. I’ll send the code for reference.

1 Like

@bader_mouti
Following is the html file that you can use. NOTE, the file cannot be used as asset in the project so you need to host it in a web server.

Bader_webviewer.txt (944 Bytes)

You have chosen to use iFrame so you need to remember that not every web site will work inside an iFrame tag.

3 Likes

Thank you so much its working good

1 Like