W3C home > Mailing lists > Public > www-svg@w3.org > November 2002

Re: SVG script

From: Kevin Lindsey <kevin@kevlindev.com>
Date: Wed, 27 Nov 2002 10:06:44 -0600
Message-ID: <004001c2962e$fbedc180$5300a8c0@monkey>
To: "Hyunju Shim" <hshim@cise.ufl.edu>, <www-svg@w3.org>
Hyunju,

> I need to read external javascript file, and create javascript inside
> of SVG document too.

> I tried code like below but this code is giving me an error.
>
> <SVG>
> <script xlink:href="outer.js" type="text/ecmascript"><![CDATA[
>     //javascript here
>     ]]></script>
> </SVG>

You need to use two separate script elements: one to load the external script and one for the internal script:

<svg>
    <script type="text/ecmascript" xlink:href="outer.js"/>
    <script type="text/ecmascript"><![CDATA[
        // ecmascript here
    </script>
</svg>

Kevin
KevLinDev - http://www.kevlindev.com
Received on Saturday, 30 November 2002 21:27:11 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:23 GMT