Just joined forum for advice on interacting with SVG object inside 
an iframe

(a) I am drawing on an example from here

http://www.xmlpdf.com/ibex-svg.html

"interacting with the parent browser"

but I would like to this feature .. 

the ibex_image.svg to be embedded in an iframe and then targetted by 
HTML buttons which 

        - call javascript in the parent (wrapper) page.
        - this parent javascript controls the SVG objects (instead 
of javascript in SVG file)
________________________________________

(b) The ibex_image.svg file is embedded in HTML thus ..

<div>
<iframe id="svgframe" name="svgframe" src="ibex_image.svg" 
width="400px" height="200px" frameborder="0" marginwidth="0"  
marginheight="0" >
<embed id="svgimage" name="svgimage" src="ibex_image.svg" 
width="400px" height="200px" type="image/svg+xml" 
pluginspage="http://www.adobe.com/svg/viewer/install/main.html"; />
</object>
</iframe>
</div>

________________________________________


(c) On parent page holding embedded ibex_image.svg is javascript 
(which does not work).  

I am trying to get this javascript (in wrapper page) to control the 
SVG objects

like this in the parent page .. which does not work ..

 <script type="text/javascript">
 function setFontSize (size)    {
        var svgobj;
        var svgstyle
        svgobj = 
window.parent.svgframe.document.svgimage.getSVGDocument();
        svgstyle = svgobj.getStyle();
        svgstyle.setProperty("font-size", size);

the embedded version in the ibex_image.svg which does work is below 
(but see the full script at the web xmlpdf.com site) ..

        var svgdoc = document.svgimage.getSVGDocument();

________________________________________


My question:- What is the correct syntax for javascript in parent 
page to change property in SVG object embedded in iframe?

i.e. navigating DOM .. window > parent > framename > embedname > 
document etc.

How to get the ibex_image.svg demo to work .. in an iframe.

Thanks.





-----
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