Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > RocketCake
Use externe javascript?

fabbio
Registered User
Quote
2023-12-29 14:46:50

Sorry, my English is a bit poor, so I translated with deepl.

How do I call an external script?
I have a jacascript in the "jscript" subfolder.

The script is called Timer.js.

Where or how do I put it in RC?

I have it in the html module with </script>.
<script src="jscript/Timer.js"></script> but it does not work.

but it doesn't work there.
The result should look like this:

http://deuteriumoxid.com/jscript...

Thanks for your help.


erik
Registered User
Quote
2023-12-30 07:18:30

If your script is located there, then it should work. You can open the developer console of your browser to see if there is an error.


fabbio
Registered User
Quote
2023-12-31 12:21:44

Hello Erik, thank you very much for the quick feedback.
Yes you are right, it also works with RC, but only if the
HTML file with the JS file in the same folder and are called.

<canvas id = "canvas" = "event.Preventdefault ()"> </ Canvas>
<Script Type = 'Text/JavaScript'>
var modules = {
Canvas: (Function () {return document.getelementbyid ('canvas');}) ()
};
</script>

<script src = "timer.js"> </script>

This code is then in a container where there is an HTML module.

As soon as I do the JS with the associated .data and .wasm files
in a subfolder sliding and with
<script src = "jscript/timer.js"> </script>
Calls, the whole thing no longer runs.

For info,
The JavaScript with the .data and .wasm files are with GLBASIC
generated.

Maybe the problem is here.
I will inquire there in parallel.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "?nternational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact