ok very interesting, it seems to be a question of namespaces isn't it? if i understand IE is permissive and forgot to define namespaces but does firefox respect the w3c, i didn't read something like (createElementNS)that on w3c's site??
----- Original Message ----- From: <[EMAIL PROTECTED]> To: <svg-developers@yahoogroups.com> Cc: <svg-developers@yahoogroups.com> Sent: Monday, February 20, 2006 3:23 PM Subject: Re: Rép. : [svg-developers] setAttribute & firefox Hi, svg-developers@yahoogroups.com wrote on 02/20/2006 09:17:02 AM: > myGridGroup = svgdoc.createElement("g"); This is not an SVG 'g' element, so Mozilla won't treat the attribute named 'id' as an 'ID' attribute. I suspect you really want: var SVGNS = "http://www.w3.org/2000/svg"; myGridGroup = svgdoc.createElementNS(SVGNS, "g"); > myGridGroup.setAttribute("id","myGridGroup"); > myGridLineGroup.appendChild(myGridGroup); > > test=svgdoc.getElementById("myGridGroup"); > alert(test); > > > > ----- Original Message ----- > From: "Jérome de la Goutte" <[EMAIL PROTECTED]> > To: <svg-developers@yahoogroups.com> > Sent: Monday, February 20, 2006 1:36 PM > Subject: Re: Rép. : [svg-developers] setAttribute & firefox > > > Hi > > When you create your group element, it is "only in memory". It is not > attached to any DOM tree, and as a consequence, it is not a child of your > SVG document. > > After creating it, you should append it to your svgdocument by > svgdoc.appendChild(myGroup) > > Then, you will be able to read the DOM tree of your SVG document and get > your element by its id. > > is it clearer? > > --------------------------------------- > Jérôme de la Goutte > Responsable de projet > ISAGRI Ingéniérie > E-mail : [EMAIL PROTECTED] > Site web : www.terre-net.fr & www.isagri.fr > tel: 03 44 06 84 04 > fax: 03 44 06 55 61 > > >>> [EMAIL PROTECTED] 20/02/2006 13:30 >>> > i don't understand your answer > > ----- Original Message ----- > From: "Jérome de la Goutte" <[EMAIL PROTECTED]> > To: <svg-developers@yahoogroups.com> > Sent: Monday, February 20, 2006 1:02 PM > Subject: Rép. : [svg-developers] setAttribute & firefox > > > Hi > > Souldn't you append group to svgdoc before trying to get it? > > Jérôme > > --------------------------------------- > Jérôme de la Goutte > Responsable de projet > ISAGRI Ingéniérie > E-mail : [EMAIL PROTECTED] > Site web : www.terre-net.fr & www.isagri.fr > tel: 03 44 06 84 04 > fax: 03 44 06 55 61 > > >>> [EMAIL PROTECTED] 20/02/2006 12:29 >>> > my code works with IE not with FireFox: > > > myGridGroup = svgdoc.createElement("g"); > myGridGroup.setAttribute("id","myGridGroup"); > test=svgdoc.getElementById("myGridGroup"); > alert(test); > > resultat de alert: null avec FireFox, pas de pb avec IE??? > > > > [Non-text portions of this message have been removed] > > > > ----- > To unsubscribe send a message to: [EMAIL PROTECTED] > -or- > visit http://groups.yahoo.com/group/svg-developers and click "edit my > membership" > ---- > > > > SPONSORED LINKS > Xml format Svg Data > YAHOO! GROUPS LINKS > > Visit your group "svg-developers" on the web. > To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > > > > > Click here to report this email as spam. > > > > >>>>-------------------------------------------------------------<<<< > Ce message a été traité contre les virus par quatre outils différents > (Kaspersky, McAfee, Symantec et Huntsman). > This message has been scanned for viruses (by Kaspersky, McAfee, Symantec > and Huntsman). > >>>>-------------------------------------------------------------<<<< > > > ----- > 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 unsubscribe send a message to: [EMAIL PROTECTED] > -or- > visit http://groups.yahoo.com/group/svg-developers and click "edit my > membership" > ---- > > > > SPONSORED LINKS > Xml format Svg Data > YAHOO! GROUPS LINKS > > Visit your group "svg-developers" on the web. > To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > > > > > > > ----- > 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 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 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 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/