Web works in IDE but not as Standalone

Bringing your stacks to the web

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
peter_lboro
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 23
Joined: Mon Mar 20, 2006 10:32 pm
Location: Loughborough, UK
Contact:

Web works in IDE but not as Standalone

Post by peter_lboro » Sun Jan 16, 2022 12:32 pm

I have an app that runs inside a web page. When I run it using the Test button in the IDE, the engine and app download and then run correctly. However, when I create a standalone it seems to load the engine and app but it doesn't run, the browser page remains blank.

Here is my setup:
1. on my web site I have a folder 'towersWeb' containing the following files:
towersOfHanoi.html
standalone-10.0.0-dp-1.js
standalone-10.0.0-dp-1.wasm
standalone.zip

2. the file towersOfHanoi.html contains the following:
<html>
<body>
<div> <canvas style="border: 0px none;" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
</div>
<script type="text/javascript">
var Module = { canvas: document.getElementById('canvas') };
</script>
<script async="" src="standalone-10.0.0-dp-1.js"></script>
</body>
</html>

I thought the problem might be the location of the towersOfHanoi.html file relative to the folder towersWeb, but I have tried placing the html file immediately outside the folder and inside the folder, but neither work. Nevertheless this feels like a reference problem, but I can't see it!

Any help please?

Peter
--
Peter Reid
Loughborough, UK

peter_lboro
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 23
Joined: Mon Mar 20, 2006 10:32 pm
Location: Loughborough, UK
Contact:

Re: Web works in IDE but not as Standalone

Post by peter_lboro » Sun Jan 16, 2022 6:19 pm

Further information: the problem is browser specific!

My sample standalone works normally with:
Safari (14.1.2 (14611.3.10.1.7))
Edge (97.0.1072.62)
Opera (82.0.4227.58)

My sample standalone doesn't work with:
Firefox (96.0.1)
Chrome (97.0.4692)

Peter
--
Peter Reid
Loughborough, UK

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Web works in IDE but not as Standalone

Post by FourthWorld » Sun Jan 16, 2022 6:32 pm

Are you attempting to run the files from your local disk, or downloaded from a server?

Some browsers prevent local execution of JavaScript for security reasons.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

peter_lboro
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 23
Joined: Mon Mar 20, 2006 10:32 pm
Location: Loughborough, UK
Contact:

Re: Web works in IDE but not as Standalone

Post by peter_lboro » Mon Jan 17, 2022 10:52 am

I'm running from my website
--
Peter Reid
Loughborough, UK

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9285
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Web works in IDE but not as Standalone

Post by richmond62 » Mon Jan 17, 2022 12:20 pm

Are you generating your web standalone from the DP of LC 10 or from a previous version?

Post Reply

Return to “HTML5”