ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Dynamic Content with DOM-2 (Part I of II)
Subject:   The quick brown fox...
Date:   2005-04-27 12:42:27
From:   normalforce
I have noticed something interesting. When I click on the "call replaceSpan()" button the first time and have the fox jump ontop of the astounded zebra I don't get any Javascript errors. However, the next time I click on it, I get an uncaught exception error on the line that with the replaceChild method.


This is the same problem I have when I have two buttons trying to make the fox do different things. The first button successful writes the text while the second yields the aforementioned error.


Am I missing something? Should the variables be cleared before trying to write another textNode to the span? I can't figure out what I am doing wrong.


1 to 1 of 1
  1. The quick brown fox...
    2005-04-27 13:16:48  normalforce [View]

1 to 1 of 1