Event Handler not working on repeating table

J

John

I have a repeating table that has an event handler ( OnAfterChange) that
works on the first entry, but when a new entry is added to the table, the
event handler doesn't work. Shouldn't this work on each entry on the entire
table? Here is the code below:

function msoxd_exp_rate::OnAfterChange(oEvent)
{
// Write code here to restore the global state.

if (oEvent.IsUndoRedo)
{
// An undo or redo operation has occurred and the DOM is read-only.
return;
}

// A field change has occurred and the DOM is writable.
var xmlDom = XDocument.DOM
var xmlTotal =
xmlDom.selectSingleNode("/exp:expenseReport/exp:items/exp:item/exp:totalAmount");
var xmlAmount =
xmlDom.selectSingleNode("/exp:expenseReport/exp:items/exp:item/my:amount");
var xmlRate =
xmlDom.selectSingleNode("/exp:expenseReport/exp:items/exp:item/exp:rate");


setNodeValue(xmlTotal, (getNodeTypedValue(xmlAmount,0,true) /
getNodeTypedValue(xmlRate,0,true)));

calcTotals();

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top