Re: Javascript Function!!
Re: Javascript Function!!
The text changing event you will have to trigger on the actual text inputs. But, the code below should produce the same results.
Code:
function txtEstimatedContractTotal() {
if (m_bChangeOccuring) {return;}
m_bChangeOccuring = true;
double dPercent = 0;
// you will have to make sure that the following elements have IDs
txtPercentage = document.getElementById('txtPercentage');
txtEstimatedCommission = document.getElementById('txtEstimatedCommission');
txtEstimatedContractTotal = document.getElementById('txtEstimatedContractTotal');
txtBalance = document.getElementById('txtBalance');
txtDepositReceived = document.getElementById('txtDepositReceived');
txtBalanceReceived = document.getElementById('txtBalanceReceived');
try {
dPercent = txtPercentage.value;
txtEstimatedCommission.value = txtEstimatedContractTotal.value * dPercent;
txtBalance = txtFinalContractTotal.value - txtDepositReceived.value - txtBalanceReceived.value;
}
catch (e) {}
m_bChangeOccuring = false;
}
Re: Javascript Function!!