T
TJ
Hi,
I have a dropdown control(Let's say ddlPlacement), and a repeating table.
In the repeating table, I have another dropdown control.(Let's say this
ddlItemlookup)..
In OnAfterChange event of ddlPlacement, I would like to add one text into
ddlItemlookup dynamically...
Here is Schema..
myFields
- ddlPaclement
- Items
- ItemFields
- ddlItemlookup
Here is what I did...
function ...ddlPlacement::OnAfterChange(eventObj) {
....
...
var items = XDocument.DOM.selectNodes("/my:myFields/my:Items/my:ItemFields");
for(var i = 0; i < items.length; i++) {
var itemLookup = items(i).selectSingleNode("my:ddlItemlookup");
var oNode = XDocument.DOM.createNode(1, "ddlItemlookup",
"http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-10-11T02:05:28");
oNode.text = "Test";
itemLookup.appendChild(oNode);
}
....
}
However, it generates error " Element ddlItemlookup is unexpected according
to content model of parent element......"
error line number indicates to appendChild....
Any ideas?
Thanks in advance.
I have a dropdown control(Let's say ddlPlacement), and a repeating table.
In the repeating table, I have another dropdown control.(Let's say this
ddlItemlookup)..
In OnAfterChange event of ddlPlacement, I would like to add one text into
ddlItemlookup dynamically...
Here is Schema..
myFields
- ddlPaclement
- Items
- ItemFields
- ddlItemlookup
Here is what I did...
function ...ddlPlacement::OnAfterChange(eventObj) {
....
...
var items = XDocument.DOM.selectNodes("/my:myFields/my:Items/my:ItemFields");
for(var i = 0; i < items.length; i++) {
var itemLookup = items(i).selectSingleNode("my:ddlItemlookup");
var oNode = XDocument.DOM.createNode(1, "ddlItemlookup",
"http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-10-11T02:05:28");
oNode.text = "Test";
itemLookup.appendChild(oNode);
}
....
}
However, it generates error " Element ddlItemlookup is unexpected according
to content model of parent element......"
error line number indicates to appendChild....
Any ideas?
Thanks in advance.