0
Under review

HTML won’t run

marc.chanliau 1 month ago in iPad • updated by Alexander Blach (Developer) 1 month ago 1

I have a simple HTML file that uses a simple external JS script and when I open the HTML file locally in Textastic, I get a blank page. Here are the files. Both files are in the same folder In Textastic. 


external_script2.html


<html><head> <meta charset="UTF-8"> <title>WebPage for JS Programs</title> </head><body> <script type="text/javascript" src="./program1.js"> </script> </body></html>

program1.js


document.writeln('Hello World');










 




Under review

Hello, I just tried your code and it works fine on my device. 


Where are your files stored? The files must be stored somewhere in "Local Files" or "iCloud" so that the web preview can find linked files. It does not work when the files are opened individually using the "Open…" command and are stored outside of Textastic's sandbox.

Also make sure that the files really have the correct file names. File names on iOS are case sensitive, so while "program1.js" works, "Program1.js" would not work.