I am having a problem with a javascript code. I want to update 2 update panels with javascript. here is the code. The updPnlLoadPm开发者_高级运维t has 3 triggers but the 2nd updatePanel does not have any triggers. Could that be a problem? Thank you!
function pageLoadedHandler(sender, args) {
var updatedPanels = args.get_panelsUpdated();
var loadpmtPnlID = '<%=updPnlLoadPmt.ClientID %>';
var AdvancepmtPnlID = '<%=UpdPnlAdvances.ClientID %>';
if (updatedPanels.length > 0) {
if (loadpmtPnlID == updatedPanels[0].id) {
document.getElementById('<%=txtTotalDueAmount.ClientID %>').value = document.getElementById('<%=loadDueAmount.ClientID %>').value;
} else if (AdvancepmtPnlID == updatedPanels[0].id) {
document.getElementById('<%=txtTotalDueAmount.ClientID %>').value = document.getElementById('<%=hdnadvanceDue.ClientID %>').value;
}
}
}
精彩评论