Martin,

This approach works well on a static document but I get curious 
behaviour on Firefox when dynamically loading the foreign elements 
using XMLHttpRequest...it only seems to work if there is a blank 
element of that type already in the document - e.g. <xyz:fruitBats 
id=""/>

I could understand if I had declared the element using #REQUIRED, 
but it is only #IMPLIED

If I take the blank element out of the SVG document, firefox reports 
that the element I'm searching for has no properties, even though I 
can see those properties in the DOM inspector.

I first suspected that I had to reference the NS in the 
getElementByIdNS() statement - but FF doesn't seem to like that at 
all...and only returns anything if I leave the NS reference null and 
have a blank instance of an element in the .svg

Any ideas??

Alan

--- In [email protected], "Martin Honnen" 
<[EMAIL PROTECTED]> wrote:
>
> --- In [email protected], "krugerboy1971"
> <alan.smithy@> wrote:
> 
> > Firefox won't let me use GetElementById on this sort of element:
> > 
> > <xyz:fruitBats id="bat1"..../>
> 
> getElementById is a method of the document and I am sure Firefox 
lets
> you use document.getElementById('bat1') just fine, but to have it 
find
> the element above (and not return null) you need to have the 
internal
> subset of the DTD define
>   <!ATTLIST xyz:fruitBats id ID #IMPLIED>
> That should do for Firefox and for Opera 9.
> 
> Opera 9 also supports the generic xml:id e.g.
>   <xyz:fruitBats xml:id="bat1"/>
> not requiring any DTD declaration to have document.getElementById 
find
> such elements.
>






-----
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:
    mailto:[EMAIL PROTECTED] 
    mailto:[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