View Full Version : include javascript file
It's possible to include/import SomeJavaScript.js file into the .lzx, or I need to write it as 'Library' file?
antun
04-01-2004, 12:42 PM
You'd have to write it as a library file.
<library>
<script>
....
</script>
</library>
-Antun
You can also include the script file directly, by using the src attribute of the <script> tag:
<canvas>
<script src="SomeJavaScript.js"/>
</canvas>
BTW, since LZX implements the XInclude XInclude (http://www.w3.org/TR/xinclude/) standard, you could use <include> instead:
<canvas debug="true">
<script>
<include href="SomeJavaScript.js" type="text"/>
</script>
</canvas>
This is just plain silly for including a script file, but can be useful for including a block of text from another file:
<canvas debug="true">
<text>
<include href="content.txt" type="text"/>
</text>
</canvas>
Thanks a lot!
Very helpful!
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.