Re: How can I DomDocument->renameNode?

From: Date: Sun, 03 Jun 2007 19:19:43 +0000
Subject: Re: How can I DomDocument->renameNode?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-256028@lists.php.net to get a copy of this message
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

« previous php.general (#256028) next »