Re: JavaScript Frameworks and svg

voipme <[email protected]>
Newsgroups gmane.comp.mozilla.devel.svg
Organization http://groups.google.com
Message-ID <b1baaf2a-a064-4e31-964d-df54066a1b3d@j38g2000yqa.googlegroups.com>
On Oct 9, 4:22 pm, jhon <[email protected]> wrote:
> Integration of script.aculo.us and svg.
>
> i have the following file:
>
> test1.xml
> the source:
>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
>  <title>DEMO</title>
>  <script src="prototype.js" type="text/javascript"></script>
>  <script src="scriptaculous.js" type="text/javascript"></script>
> </head>
> <body id="body" style="position:absolute; z-index:0; border:1px solid
> black; left:5%; top:5%; width:90%; height:90%;">
>
> <script type="text/javascript">
> // <![CDATA[
> function shake_these(){
>  new Effect.Shake("shake10", {distance:100});}
>
> // ]]>
> </script>
> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 100
> 100"  preserveAspectRatio="xMidYMid slice" style="width:100%; height:
> 100%; position:absolute; top:0; left:0; z-index:-1;">
> <rect id="shake10" x="10" y="50" width="20px" height="10px" fill="red"
> onclick="new Effect.Shake(this, {duration:2.0}); return false;"/>
>  </svg>
> </body>
> </html>
> ...
> I have the following error (error console firefox 3.0.1):
>
> Error: document.write is not a function
> Source file: file:///home/hmusvg/Escritorio/SVG/scriptaculous.js
> Line: 30
>
> Know how to integrate this?, is possible?...
>
> Some way for integrate JavaScripts Frameworks en svg/xml files for
> visualization in browsers?
>
> I appreciate your help.
> Thanks-

Just to save you some trouble, the Effect.Shake is probably not going
to work.  I'm pretty sure that the scriptaculous library uses CSS
properties to animate elements, which isn't going to work with SVG.
You'll have to do a bit of writing in order to have some functions
that manipulate the XML properties of the SVG elements.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.