Hi gary,

> <svg contentScriptType="text/javascript" width="200" height="200"
> version="1.1" xmlns="http://www.w3.org/2000/svg";>
[...]
> 1. Inline the show_alert() method inside the SVG itself or point the SVG
> to an external script (e.g. <script type="text/ecmascript"
> xlink:href="functions.js"/>).

Note that the code snippet uses "text/javascript" whereas the external
script uses "text/ecmascript". Although one could/would expect them to
be the same, apparently up until now they weren't. I'm not sure if it
was intended or just a coincidence, but Cameron has recently committed
a change (revision 801512 [1]) which should help avoiding this somehow
unexpected behavior. You may test it by updating the source code [2]
or use a nightly build [3]. ;-)


> I don't really want to use any of those, though - I'd like to be able to
> access my function in the HTML document. Is there any way of doing this
> using Batik?

This may prove to be a bit unrelated with the previous subject because
applet<-->browser communication can sometimes be challenging.
Nevertheless, Batik has a great demonstration [4] which almost fits
this use-case like a glove: HTML to SVG communication is performed
when you want the reverse, should be fairly easy to adapt. :-)


Somehow related, I've recently created a thread on medium term changes
to applet<-->HTML communication changes [5], at least in Firefox,
which you may want to take a look at. If you find anything of
interest, please follow up on the other thread. ;-)


Hope this helps,
 Helder


[1] http://svn.apache.org/viewvc?view=rev&revision=801512
[2] http://xmlgraphics.apache.org/batik/download.cgi#Subversion+repository
[3] http://mcc.id.au/batik-nightly/
[4] http://xmlgraphics.apache.org/batik/demo.html
[5] 
http://www.nabble.com/Firefox-.next%3A-LiveConnect-feature-removal-ts24567283.html#a24567283

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to