I have tried making a new node, inserting it before the old node then
removing the old node but I could not figure out how to get the
nodeValue to include the child nodes, so they get stripped out leaving
only the text value.
You might try something like this:
function replaceNode() {
var inChoice = document.getElementById("grafCount").selectedIndex;
var inText = document.getElementById("textArea").value;
var newText = document.createTextNode(inText);
var newGraf = document.createElement("p");
newGraf.appendChild(newText);
var allGrafs = nodeChangingArea.getElementsByTagName("p");
var oldGraf = allGrafs.item(inChoice);
nodeChangingArea.replaceChild(newGraf,oldGraf);
}
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php