Page 1 of 1

How to use the javascript interface

Posted: 17 Feb 2016 12:52
by WolframS
I am wondering how in practice I can use the javascript interface? Can I include external js-files like

Code: Select all

<script type="text/javascript" src="filename.js"></script>
or do I have to write the script directly into the openLCA editor? Can I save somehow what I have written in js in openLCA? Thank you.

Re: How to use the javascript interface

Posted: 17 Feb 2016 19:05
by aciroth
Hi, indeed you need to type Javascript in the Javascript interface.
Hth,
Andreas

Re: How to use the javascript interface

Posted: 01 Aug 2016 10:05
by msrocka
You can include external JavaScript files via the load function:

Code: Select all

load("path/to/your/file.js")
There is a small section about this in the user manual (http://www.openlca.org/documents/14826/ ... 021a8aa7e7, 11.2.2) that shows how to load math.js in openLCA.