Do you have a question? Post it now! No Registration Necessary. Now with pictures!
May 3, 2005, 5:06 pm
rate this thread
I need to clear out the HTML contents of a <span> element and then
re-add that element as a blank span.
Here is the code...
var elem = document.getElementById(spanId);
var deletedElem = elem.parentNode.removeChild(elem);
deletedElem.innerHTML = '<span id="'+spanId+'"></span>';
This does not work. When I try to getElementById the second time the
function is called it does not find the span I added. Any suggestions?
Thanks in advance for any help.
Re: clearing out a
"" wrote in comp.infosystems.www.authoring.html:
>var elem = document.getElementById(spanId);
Stan Brown, Oak Road Systems, Tompkins County, New York, USA