# \[SOLVED 2/2/24 10:48 AM EDT\] Javascript on webviewer

**URL:** https://community.thunkable.com/t/solved-2-2-24-10-48-am-edt-javascript-on-webviewer/2800896
**Category:** Web API's
**Created:** [January 24, 2024, 2:52pm UTC](https://community.thunkable.com/t/solved-2-2-24-10-48-am-edt-javascript-on-webviewer/2800896 "2024-01-24T14:52:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jacob.saravia9n](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@jacob.saravia9n](https://community.thunkable.com/u/jacob.saravia9n)
#### Post date: [January 24, 2024, 2:52pm UTC](https://community.thunkable.com/t/solved-2-2-24-10-48-am-edt-javascript-on-webviewer/2800896/1 "2024-01-24T14:52:57Z")

</div>

I have created this html page  
[https://www.tecnofuego.cl/encoder.html](https://www.tecnofuego.cl/encoder.html)

to use the following javascript

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/2/d2f1d61655c1c30415a8d833cf82172a4956d65e.png)

I try to get an sql query encoded, so I put the URL on the Web\_viewer component, but all I get as a response is “undefined”

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/a/5a85eea0d9231b312d3de165f0cd13959769e46a.png)

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [January 24, 2024, 8:34pm UTC](https://community.thunkable.com/t/solved-2-2-24-10-48-am-edt-javascript-on-webviewer/2800896/2 "2024-01-24T20:34:18Z")

</div>

I’m guessing you hosted the file as a local asset?

---

<div class="post-metadata">

### Author: ![jacob.saravia9n](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@jacob.saravia9n](https://community.thunkable.com/u/jacob.saravia9n)
#### Post date: [January 25, 2024, 4:50pm UTC](https://community.thunkable.com/t/solved-2-2-24-10-48-am-edt-javascript-on-webviewer/2800896/4 "2024-01-25T16:50:03Z")

</div>

No at the beggining.  
But now I’ve uploaded the file on the app assets, and referenced the webviewer url simply to “encoder.html”… sadly, It didn’t solve the problem.

---

<div class="post-metadata">

### Author: ![jacob.saravia9n](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@jacob.saravia9n](https://community.thunkable.com/u/jacob.saravia9n)
#### Post date: [February 2, 2024, 3:48pm UTC](https://community.thunkable.com/t/solved-2-2-24-10-48-am-edt-javascript-on-webviewer/2800896/5 "2024-02-02T15:48:00Z")

</div>

Nevermind, I just create a manual function to replace all the special characters to match the URI encode.
