Hi all,

I'm new to Batik (and Java for that matter). I'm trying to make a flexible applet that I can change various properties of a loaded SVG via javascript functions (not ECMAscript functions in the SVG file itself but JS functions in the HTML file that the java applet is embedded in).

How it currently works:

In my java applet (using JSVGCanvas) there is a function updateElement(), which basically does:
Element elem = doc.getElementById(element_id)
elem.setAttributeNS(null, attribute, value).

This is called in javascript/HTML land by:

myObject = document.getElementById(id_of_applet);
myObject.updateElement("svg_element_id_to_update", "fill", "yellow");

It works great for the properties I can easily reference (e.g. fill, stroke, opacity) etc. but I'm struggling trying to dynamically change things like text content, xlink:href for textPath to change to a different path and/or updating a path definition.

Can anyone shed any light on the java required to change the contents of the text field, the textPath xlink:href and path definitions?

I have tried the obvious things (e.g. using my function above in the case of textPath xlink:href and path definitions), but seem to be missing something...

Many thanks,

Andy




---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org

Reply via email to