HighDots Forums  

Calling a function within an SVG from it's embedding HTML?

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss Calling a function within an SVG from it's embedding HTML? in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Albasani
 
Posts: n/a

Default Calling a function within an SVG from it's embedding HTML? - 07-24-2007 , 04:29 AM






Hi,

I tried a lot of ways, but I just can't seem to get this accomplished.
If I got a SVG embedded like this :

<td align="center"><embed id="Info" type="image/svg+xml"
style="z-index:2;position:absoulute" wmode="trandsparent"
src="Info.svg"/></td>

and within it a function defined : function xx() { ... }
I should be able to call it from the javascript section within it's
containing HTML as follows :

document.embeds[ "Info" ].getSVGDocument().xx() ; or document.embeds[
"Info" ].getSVGDocument().rootElement.xx() ;

but as soon as I try to do so I get an Errorcode 0 saying that : The object
does not support this property or method.
Could someone tell me if it is possibly to call function within an SVG from
HTML or at least access global Variable within an SVG from HTML ?

ThanX in advance.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.