>>>>> "s" == still  <[EMAIL PROTECTED]> writes:

s> It really works,and yes it is better to put the script in the cdata
s> section.  But the problem is how to add a event(eg.a mousedown
s> event) to the element I create to invoke the script function I
s> defined as following?

s> <rect x="10" y="20" width="100" style="fill:red" height="50"
s> onmousedown="showDialog('onmousedown')"/>
s> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^And is it the normal way to
s> do so ^_^? I thought there will be methods like:

s> doc.insertFunction(Function f) ; node.insertEvent(...);

   No but there is:

   rect.setAttributeNS(null,"onmousedown", "showDialog('onmousedown')");

   If you want to handle the event in Java, you can add a Java
listener to the SVG Elements in the DOM directly.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to