> --- In [email protected], "Francis Hemsher" 
> <[EMAIL PROTECTED]> wrote:
> > Try using just the embed. You can access it by:
> > docSVG=document.embeds["svgimage"].getSVGDocument();
> > 
> > Comeback if you get stuck;)
> > Francis
> 
> 

Following on from my earlier reply .. I still have problems 
accessing the SVGdocument in an iframe ..

but I've found a workaround (until I understand how to target 
SVGdocument via window > parent > iframe > embed > document .. 
whatever that syntax is ????).

...

Instead of embedding the test.svg file in the iframe, I first 
embedded test.svg inside an HTML wrapper page .. test.html .. which 
also has in header javascript controlling the embedded SVG.

Then, in the parent page containing the iframe (which displays 
test.html with embedded test.svg) I placed links which target not 
the SVG, but instead the javascript functions which control the 
embedded SVG.

e.g. this button in the parent page

<input style='width:300px' type="button" 
value="Call Javascript function inside SVG wrapper page in iframe" 
onClick="window.parent.svgframe.functionname()" 
id="Button" name='btn'/>

calls the javascript function in the HTML page in the iframe 
name="svgframe", 

and the javascript function then controls the (local) SVGdocument.

...

Disadvantage .. an HTML wrapper page is required for each SVG file.

Advantage .. javascript functions can be <included> in the HTML 
header, and this indirect control of SVG is easier.

...

But I'm still interested in learning how the parent page javascript 
can target SVG objects directly through the DOM syntax (without 
using intermediary javascript as in this workaround).






-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-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/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

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


Reply via email to