--- In [email protected], RODOLFO MORENO LLACZA <[EMAIL PROTECTED]> wrote: > > Thanks a lot Martin. Also I want to thank for everybody who helped me. > for FF 1.5 is necessary specify the namespace ( xmlns="http://www.w3.org/2000/svg") in the element that you want to add dinamicaly (such as the example that MARTIN specified). however my issue persist until I realized that the problem wasn't the insertion of the node (appendChild). my issue was the asyncronimous process, because while the insertion was good, other problems after the inserton line have happened. > > Rodolfo > > > > Martin Honnen <[EMAIL PROTECTED]> wrote: > --- In [email protected], RODOLFO MORENO LLACZA > <[EMAIL PROTECTED]> wrote: > > > the following code insert the node inside of the document. the > insertion is good, because the XML (as string) show that the svgdoc > contain the node > > > > LINE1 node = xmlRequest.responseXML.documentElement > > LINE2 svgdoc.getElementById("mainMapGroup").appendChild(node); > > LINE3 var layerElement = svgdoc.getElementById("y_JEPN") > > > > The problem is that when I want to get some element (like the LINE3) > the layerElement result in NULL, how if the element will not existed. > > Make sure if you want to send SVG snippets that those are in the SVG > namespace e.g. if you want to send a circle you need to send > <circle xmlns="http://www.w3.org/2000/svg" > cx="50" cy="50" r="20" fill="green" /> > and not simply > <circle cx="50" cy="50" r="20" fill="green" /> > That could be one reason why getElementById fails to find the element > but it is only a guess. > > If you need more help provide some sample where it does not work, > preferable in a form of a URL. >
I have almost the same problem, and I have tried all the tricks in this thread and I can still with no success. I also would like to use getElementById on some XML document I get via XMLHttpRequest ... but well, the XML document is not SVG, nor is there any way I can make it be. Does anybody have any idea on how I can use getElementById on such a document? Regards, Catalin ----- 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/

