Re: SVG script

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 UTC