Loading ...
Sorry, an error occurred while loading the content.

Re: Batik and external ECMAScript

Expand Messages
  • Martin Honnen
    ... JavaScript in the HTML document can access the applet element with e.g. document.applets[0] or if you give the applet a name e.g.
    Message 1 of 2 , Jan 5, 2007
    • 0 Attachment
      --- In svg-developers@yahoogroups.com, "Praveen Nayak"
      <nayak.praveen@...> wrote:
      >
      > I am using the Batik viewer inside an applet, and loading an SVG
      > document. I have an ECMAScript method say 'manipulate()' inside the
      > svg file to manipulate the svg content.


      > <Applet... <!--the applet containing batik viewer,
      > which inturn holds the svg document.-->

      JavaScript in the HTML document can access the applet element with e.g.
      document.applets[0]
      or if you give the applet a name e.g.
      <applet name="svg1" ...></applet>
      then with e.g.
      document.applets.svg1
      If the browser/Java combination supports LiveConnect then the public
      members of the applet are exposed to script meaning if the applet has
      a public method then you can script e.g.
      var applet = document.applets.svg1;
      if (typeof applet.methodName != 'undefined') {
      applet.methodName();
      }

      I don't think you can get at the script functions defined in the SVG
      document unless the applet makes sure to expose them with its public
      members.
    Your message has been successfully submitted and would be delivered to recipients shortly.