R
RC
Sorry I couldn't find appropriate group for
SVG and ECMAScript. Since SVG is in XML format
and ECMAScript is very similar to JavaScript.
What's why I post in these two groups.
In the O'Reilly SVG book, in chapter 11
Animating and Scripting SVG. It mentions
some very basic functions like
var circle = event.getTarget();
var obj = svgDocument.getElementById("idName");
I got error message said these are no a function
in Firefox and batik-squiggle.jar
When I used SVGView plug-in (made by Adobe) for IE .
I typed:
var svgObject = evt.target;
var svgDoc = svgObject.getOwnerDocument();
var svgElement = svgDoc.getElementById(idName);
var svgStyle = svgElement.getStyle();
svgStyle.setProperty('stroke-width', 3);
These lines are working fine for SVGViwe Plug-in by
not work for Firefox and batik.
They complained that getOwnerDocument is not a function.
I tried to change getSVGDocument but no luck.
Is that O'Reilly book too old? Its first editoin is 2002.
How can I make getElementById() working in Firefox and Batik?
Is there some examles or some documents?
Thank Q very much in advance!
SVG and ECMAScript. Since SVG is in XML format
and ECMAScript is very similar to JavaScript.
What's why I post in these two groups.
In the O'Reilly SVG book, in chapter 11
Animating and Scripting SVG. It mentions
some very basic functions like
var circle = event.getTarget();
var obj = svgDocument.getElementById("idName");
I got error message said these are no a function
in Firefox and batik-squiggle.jar
When I used SVGView plug-in (made by Adobe) for IE .
I typed:
var svgObject = evt.target;
var svgDoc = svgObject.getOwnerDocument();
var svgElement = svgDoc.getElementById(idName);
var svgStyle = svgElement.getStyle();
svgStyle.setProperty('stroke-width', 3);
These lines are working fine for SVGViwe Plug-in by
not work for Firefox and batik.
They complained that getOwnerDocument is not a function.
I tried to change getSVGDocument but no luck.
Is that O'Reilly book too old? Its first editoin is 2002.
How can I make getElementById() working in Firefox and Batik?
Is there some examles or some documents?
Thank Q very much in advance!