Hi there,

I have a tiny issue here which I can't succeed to resolve.

I have my SVG Object in my webpage:

        <object id='svg_object' data='data_vis_bars_svg.php' 
type='image/svg+xml' width='1150' height='500'></object>

And then, I would like to offer the user the possibility to chose from a 
dropdown-box an element which should be highlighted in the SVG object. Now, the 
following javascript works well if I don't wrap it into the function. However, 
when I do use it as a function, it won't highlight the element. It is being 
called, I checked that. Any idea why that would be?
        
        <script  type="text/javascript">
                function showLine()
                {
                        // access SVG object
                        var a = document.getElementById("svg_object");
                                
                        //it's important to add an load event listener to the 
object, as it will load the svg doc asynchronously
                        a.addEventListener("load",function()
                        {
                                var svgDoc = a.contentDocument; //get the inner 
DOM of svg_object
                                var delta = svgDoc.getElementById("g492"); 
//get the inner element by id
                                delta.setAttribute("visibility", "visible");    
//add behaviour
                        },false);
                }
        </script>


Thanks for any hints,

Stef


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

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

<*> 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:
    [email protected] 
    [email protected]

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