How to use the javascript interface

Post Reply
WolframS
Posts: 2
Joined: 14 Feb 2016 17:20
Contact:

How to use the javascript interface

Post by WolframS » 17 Feb 2016 12:52

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.

aciroth
Posts: 750
Joined: 09 May 2010 23:28

Re: How to use the javascript interface

Post by aciroth » 17 Feb 2016 19:05

Hi, indeed you need to type Javascript in the Javascript interface.
Hth,
Andreas

msrocka
Posts: 18
Joined: 29 Jan 2013 10:07

Re: How to use the javascript interface

Post by msrocka » 01 Aug 2016 10:05

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest