--- In [email protected], "Martin Honnen" 
<[EMAIL PROTECTED]> wrote:
>
> --- In [email protected], "mikh2161" <mhorvath2161@>
> wrote:
> 
> > for (var i = 0; i < document.getElementById
('TopView').getSVGDocument
> > ().documentElement.childNodes.length; i++)
> >     alert(document.getElementById('TopView').getSVGDocument
> > ().documentElement.childNodes[i])
> > 
> > The problem is that the script returns 'undefined' for all of the 
child 
> > nodes. What is the issue?
> 
> I am guessing that you use the Adobe SVG viewer to render the SVG 
and
> to implement the SVG DOM. Unfortunately there you need to use
>   childNodes.item(i)
> to access an item in the childNodes (or any DOM collection for that
> matter) as the Adobe viewer does not implement the
> JavaScript/ECMAScript shortcut
>   childNodes[i]
> All other DOM implementations for JavaScript/ECMAScript however
> support both
>   childNodes.item(i)
> as well as
>   childNodes[i]
> thus if for SVG you use
>   childNodes.item(i)
> then you get portable code.
>

Thanks! I'll make a note of that.
Here's the solution I settled upon:

for (var child = node.firstChild; child != null; child = 
child.nextSibling)
{
}







------------------------ Yahoo! Groups Sponsor --------------------~--> 
You can search right from your browser? It's easy and it's free.  See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/1U_rlB/TM
--------------------------------------------------------------------~-> 

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