Loading ...
Sorry, an error occurred while loading the content.

Re: accessing new elements after using appendChild()

Expand Messages
  • cormacinfodes
    Hi, thanks a lot, the second command works perfectly. You ve ended two days of headaches! Cormac ... your ... ( circle ).item(0).firstChild.nodeValue; ...
    Message 1 of 5 , Jan 7, 2006
    • 0 Attachment
      Hi, thanks a lot, the second command works perfectly. You've ended
      two days of headaches!
      Cormac


      --- In svg-developers@yahoogroups.com, Omar Abo-Namous
      <merlin12345@g...> wrote:
      >
      > Hi,
      >
      > i dont' know what xmlDoc is here, but you should be able to access
      your
      > circle with this command:
      >
      > var monk =
      > document.getElementById("addXMLhere").getElementsByTagName
      ("circle").item(0).firstChild.nodeValue;
      > alert(monk);
      >
      > possibly also
      >
      > var monk =
      > document.getElementsByTagName("circle").item
      (0).firstChild.nodeValue;
      > alert(monk);
      > alert(monk);
      >
      > cya, Omar
      >
      >
      > cormacinfodes schrieb:
      > > Hi all,
      > >
      > > I've been using parseXML() to add elements to my SVG document
      > > successfully,
      > >
      > > function addXML(xml2parse){
      > >
      > > document.getElementById("addXMLhere").appendChild(parseXML
      > > (xml2parse,document));
      > >
      > > }
      > >
      > > however i cant seem to be able to access these appended nodes in
      > > order to manipulate them. I have been trying to access them
      using
      > > ActiveXObject("Microsoft.XMLDOM")and the following code
      > >
      > >
      > > var monk = xmlDoc.getElementsByTagName("circle")
      > > [2].firstChild.nodeValue;
      > >
      > >
      > > wbereas this code picks out any existing elements in my svg
      > > perfectly, when i point it at the new elements i've appended with
      > > parseXML() i get the javascript error "object required" as it
      cant
      > > seem to see the new elements.
      > >
      > > Anyone who knows a solution or workaround i would be very
      grateful to
      > > hear it,
      > > Thanks in advance
      > > Cormac
      > >
      > >
      > >
      > >
      > >
      > >
      > > -----
      > > To unsubscribe send a message to: svg-developers-
      unsubscribe@yahoogroups.com
      > > -or-
      > > visit http://groups.yahoo.com/group/svg-developers and
      click "edit my membership"
      > > ----
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.