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

Re: [svg-developers] How do you access the embedding HTML document from SVG

Expand Messages
  • Holger Will
    ... for more info on how to access your SVG document and window object, see http://jwatt.org/svg/demos/scripting-across-embed.html ... yes,
    Message 1 of 3 , Jul 5, 2005
      Noel O'Boyle schrieb:

      > I have an SVG document embedded in XHTML, and I want to run a Javascript
      > function in the XHTML once the SVG has loaded.
      >
      > Is there:
      > (1) an onload SVG function I can access in the XHTML or

      for more info on how to access your SVG document and window object, see
      http://jwatt.org/svg/demos/scripting-across-embed.html

      > (2) can the <svg onload="___"> be used to call a javascript function in
      > the embedding XHTML?

      yes, onload="top.doSomething()" , where doSomething() is a function
      defined in the parent XHTML.
      ive tested this with IE + ASV6 and mozilla with native SVG support. not
      sure about ASV3, but it should work, too.

      cheers

      Holger

      <http://jwatt.org/svg/demos/scripting-across-embed.html>
    • Noel O'Boyle
      Thanks for this...I will try out top . Where on the web is there some documentation which describes its use? (Because I searched the web for some time before
      Message 2 of 3 , Jul 5, 2005
        Thanks for this...I will try out "top".

        Where on the web is there some documentation which describes its use?
        (Because I searched the web for some time before I posted my question,
        and all I could find were references to accessing the SVG DOM)

        Regards,
        Noel

        On Tue, 2005-07-05 at 13:07 +0200, Holger Will wrote:
        > Noel O'Boyle schrieb:
        >
        > > I have an SVG document embedded in XHTML, and I want to run a
        > Javascript
        > > function in the XHTML once the SVG has loaded.
        > >
        > > Is there:
        > > (1) an onload SVG function I can access in the XHTML or
        >
        > for more info on how to access your SVG document and window object,
        > see
        > http://jwatt.org/svg/demos/scripting-across-embed.html
        >
        > > (2) can the <svg onload="___"> be used to call a javascript function
        > in
        > > the embedding XHTML?
        >
        > yes, onload="top.doSomething()" , where doSomething() is a function
        > defined in the parent XHTML.
        > ive tested this with IE + ASV6 and mozilla with native SVG support.
        > not
        > sure about ASV3, but it should work, too.
        >
        > cheers
        >
        > Holger
        >
        > <http://jwatt.org/svg/demos/scripting-across-embed.html>
        >
        >
        > -----
        > To unsubscribe send a message to:
        > svg-developers-unsubscribe@yahoogroups.com
        > -or-
        > visit http://groups.yahoo.com/group/svg-developers and click "edit my
        > membership"
        > ----
        >
        >
        >
        > ______________________________________________________________________
        > YAHOO! GROUPS LINKS
        >
        > 1. Visit your group "svg-developers" on the web.
        >
        > 2. To unsubscribe from this group, send an email to:
        > svg-developers-unsubscribe@yahoogroups.com
        >
        > 3. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
        > Service.
        >
        >
        > ______________________________________________________________________
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.