P
Paul Aner
Hi*,
since Frank was helping me solving my first issue ther came up
another one right now:
Within the template of the form from my Sharepoint library there is
the following code:
function msoxd_my_ArtikelNummer::OnAfterChange(eventObj) {
var txtArticleTitle;
var txtArticleNumber;
var flArticlePrice;
var currentNodeValue = eventObj.Site.nodeTypedValue;
var domArticleList = XDocument.GetDOM("Artikelliste");
allArticles = domArticleList.firstChild.firstChild.childNodes;
for (i=0; i < allArticles.length; i++) {
oneArticleElement = allArticles.item(i);
if(oneArticleElement.attributes != null) {
if (oneArticleElement.attributes(1).text == currentNodeValue) {
txtArticleTitle = oneArticleElement.attributes(0).text;
txtArticleNumber = oneArticleElement.attributes(1).text;
flArticlePrice = parseFloat(oneArticleElement.attributes(2).text);
break;
}
}
}
eventObj.Site.parentNode.childNodes.item(3).nodeTypedValue =
txtArticleTitle;
oNode = eventObj.Site.parentNode.childNodes.item(5);
if (null != oNode.getAttribute("xsi:nil") ) {
oNode.removeAttribute("xsi:nil");
}
eventObj.Site.parentNode.childNodes.item(5).nodeTypedValue =
flArticlePrice;
callRowSum(eventObj);
calculateOrderSum();
}
Filling out the form works fine, but merging makes some trouble: When
merging forms, the indices od my repeating table seem to be "shuffeled".
Within a single form in "eventObj.Site.parentNode.childNodes.item(5)"
there is the value of "flArticePrice", but when merging at least two
forms the index (5) seems to be incremented by two, because within the
merged document there is the value of item(3) being put into the value
of item(5).
How do I have to handle this?
Any ideas?
Bye and thanks a lot,
Paul
since Frank was helping me solving my first issue ther came up
another one right now:
Within the template of the form from my Sharepoint library there is
the following code:
function msoxd_my_ArtikelNummer::OnAfterChange(eventObj) {
var txtArticleTitle;
var txtArticleNumber;
var flArticlePrice;
var currentNodeValue = eventObj.Site.nodeTypedValue;
var domArticleList = XDocument.GetDOM("Artikelliste");
allArticles = domArticleList.firstChild.firstChild.childNodes;
for (i=0; i < allArticles.length; i++) {
oneArticleElement = allArticles.item(i);
if(oneArticleElement.attributes != null) {
if (oneArticleElement.attributes(1).text == currentNodeValue) {
txtArticleTitle = oneArticleElement.attributes(0).text;
txtArticleNumber = oneArticleElement.attributes(1).text;
flArticlePrice = parseFloat(oneArticleElement.attributes(2).text);
break;
}
}
}
eventObj.Site.parentNode.childNodes.item(3).nodeTypedValue =
txtArticleTitle;
oNode = eventObj.Site.parentNode.childNodes.item(5);
if (null != oNode.getAttribute("xsi:nil") ) {
oNode.removeAttribute("xsi:nil");
}
eventObj.Site.parentNode.childNodes.item(5).nodeTypedValue =
flArticlePrice;
callRowSum(eventObj);
calculateOrderSum();
}
Filling out the form works fine, but merging makes some trouble: When
merging forms, the indices od my repeating table seem to be "shuffeled".
Within a single form in "eventObj.Site.parentNode.childNodes.item(5)"
there is the value of "flArticePrice", but when merging at least two
forms the index (5) seems to be incremented by two, because within the
merged document there is the value of item(3) being put into the value
of item(5).
How do I have to handle this?
Any ideas?
Bye and thanks a lot,
Paul