Hi Dylan, scooter <[EMAIL PROTECTED]> wrote on 02/15/2007 06:41:32 AM:
> Could someone point me towards documentation or advice on the best way to > embed JavaScript events from Batik. > > I currently have the code: > > element.setAttributeNS(null, "onmouseout", "doSomething(evt);"); > > Which works fine, but obviously ties my function name into the code. > > Is there a better way of doing this? Are you doing the above from JavaScript or from Java? If you are doing it from Java you might be better off using 'addEventListener' to register a Java Object to receive the event. If it has to be handled in JavaScript I would lean towards the above, although it might also be possible to have the JavaScript use LiveConnect to register the functions to call with the Java Side of things (basically you can bind a Java Object as a global in the JavaScript environment and then JavaScript can call Java Methods on that object). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]