try this:

var root = document.getDocumentElement();

And then operate on that root eg:
var node = document.createElement("myelement");
root.insertBefore(node,root.getFirstChild());
root.appendChild(node);

Kind Regards,
Jan


Derek Hohls wrote:

Simple question; I need to extract/change data coming
from a Cform after it has been updated, but before
it is saved to file.  So, typically, it looks like this:

var document = loadDocument(documentID); form.load(document); form.showForm("mypipe");
form.save(document);


Now a call like:

 var keyNode = document.firstChild;

is valid, but a call like:
   var keyNode = document.firstChild.firstChild;
   if (keyNode != null) {
     document.insertBefore(keyNode,keyNode);
   }

gives an error for the insert operation.
org.w3c.dom.DOMException: NOT_FOUND_ERR: An attempt is made to reference a node in a context where it does not
exist.
(and simlar for other types of chnage operations, in fact)


So, how does one actually manipulate the document being returned from the form?

Thanks
Derek





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to