Take a look at 
http://www.w3.org/Graphics/SVG/IG/resources/svgprimer.html#joint_use -- there 
is an example there (look inside a table named "Making SVG functions callable 
from HTML ").

Basically, suppose the <svg> is linked from the <html> via <object>, <embed> or 
<iframe>. And suppose the function within a <script> inside the <svg> is named 
happy(). Then, issue a command within the svg script that says top.happy=happy. 
This basically forces the <html> parent of the svg to alias the term "happy" to 
its definition within the svg <script> tag. Similar things may be done to 
access variables defined within svg script.

hope this helps
David
  ----- Original Message ----- 
  From: kalyan_ayyagari 
  To: svg-developers@yahoogroups.com 
  Sent: Wednesday, January 05, 2011 7:40 AM
  Subject: [svg-developers] SVG internal script


    
  Is there a way to access the internal script of a SVG file from a HTML where 
its embedded into?

  I have a SVG file which has some script in it...
  <svg
  <script type="text/ecmascript" xlink:href="svgSample.js"/>
  ....

  If i try to access a function in this js file from a HTML file
  where this SVG is embedded, it shows
  'Uncaught ReferenceError: function is not defined'

  any thoughts??



  

[Non-text portions of this message have been removed]



------------------------------------

-----
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
----Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    svg-developers-dig...@yahoogroups.com 
    svg-developers-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    svg-developers-unsubscr...@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to