Hi ,
i have a html table with 4 columns , in this the multiplication of 2nd and 3rd column (this value entered by user) will be displayed in 4th coulumn . here i am using innerhtml to add the value in to particular coulumn but its not added.
Code -
<script type="text/javascript">
function onMnDUnitChange(txtField, iPropOrder) {
var rsSection, msg = '';
rsSection = mndCalProp[iPropOrder]
var sTemp = txtField.value;
var totalMnDUnits = 0;
var totalMnDScores = 0;
if (txtField.value == "" || txtField.value == null) {
mndCalProp[iPropOrder].units = 0;
mndCalProp[iPropOrder].score = 0;
}
else {
mndCalProp[iPropOrder].units = sTemp;
}
for (iLoop = 0; iLoop < mndCalProp.length; iLoop++) {
mndCalProp[iPropOrder].score = parseInt(mndCalProp[iPropOrder].devicescore, 10) * parseInt(mndCalProp[iPropOrder].units, 10);
totalMnDUnits = totalMnDUnits + parseInt(mndCalProp[iPropOrder].units, 10);
totalMnDScores = totalMnDScores + parseInt(mndCalProp[iPropOrder].score, 10);
var lblScroreName;
lblScroreName = 'lblMnDScore' + iLoop;
var lblctl;
if (mndCalProp[iPropOrder].score == 0) {
lblctl = document.getElementsByName(lblScroreName);
document.getElementsByName(lblScroreName).innerHTML = "";
}
else {
lblctl = document.getElementsByName(lblScroreName);
document.getElementsByName(lblScroreName).innerHTML = mndCalProp[iPropOrder].score;
}
}
if (totalMnDUnits.score == 0) {
document.getElementById("lblMnDTotalUnits").innerHTML = "";
}
if (totalMnDScores == 0) {
document.getElementById("lblMnDTotalScores").innerHTML = "";
}
}
</script>