Hi,
var modelElem = document.getElementById("theModel");
var xmlSite = instDoc.getElementsByTagName("currSite")[0].childNodes[0];
On Jul 01, 2012, at 10:22 PM, Mark Seaborne <[email protected]> wrote:
xmlSite.nodeValue ='fred';
but still
modelElem.rebuild();
modelElem.recalculate();
modelElem.revalidate();
modelElem.refresh();
modelElem.recalculate();
modelElem.revalidate();
modelElem.refresh();
do not seem to be carrying the new value of xmlSite.nodeValue into the XML instance used by the XForms model.
Any ideas where I am going wrong?
Best wishes
Mark
On Jul 01, 2012, at 10:22 PM, Mark Seaborne <[email protected]> wrote:
Hi,I am using .getInstanceDocument to successfully access values from an instance within script.However, I don't know how to set a node value in my script, Here is what I have tried thus far:var modelElem = document.getElementById("theModel");
var instDoc = modelElem.getInstanceDocument("variables");
var xmlSite = instDoc.getElementsByTagName("currSite")[0];
xmlSite.textContent = 'fred';
modelElem.rebuild();
modelElem.recalculate();
modelElem.revalidate();
modelElem.refresh();alert(xmlSite.textContent);The alert displays the modified value, but the XForm does not. I guess that I am doing something fairly simple wrong?Best wishesMark------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Xsltforms-support mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xsltforms-support
