modify svg or svg dom object?

2002-07-23 Thread still
Hi all: Once a SVG file(.svg) is generated,can the user modify the SVG file via script event? So the next time when the svg file is displayed,the user will not need to modify the svg file anymore. Eg. There is a rect displayed on the svg browser, and then the user dragged the rect to another place

RE: add script functions and event via batik api--how

2002-07-19 Thread still
; Element scriptCode = doc.createTextElement("function showDialog() { \n alert('msg'); })"); script.appendChild(scriptCode); svg.appendChild(script); Actually, it is better practice to put your code in a CDATA section and use the createCDATASection method to do so. I hope this helps, Regards, Vi

add script functions and event via batik api--how

2002-07-19 Thread still
Hi,all: I try to create a SVG DOM object via batik api. The SVG DOM should be look like this: // http://www.w3.org/2000/svg"; width="400" height="450"> function showDialog(msg) { alert(msg); } // it is easy to create the "rect" element to