I want to round up a number to 2 decimal places, such as 312.12.
Here is my code which doesn't work correctly. Could you please suggest what I am doing wrong.
(document.getElementById("AmtReturn").value = valAmtRefund*valConvRate;)
function populateAmtReturned(){
var valConvRate = document.getElementById("convRate").value;
var valAmtRefund = document.getElementById("AmtRefund").value;
var valAmtReturn = document.getElementById("AmtReturn").value;
if(!(valAmtRefund.length >0))
{
ShowErrorEx('AmtRefund','Amount Refunded');
return false;
}
if(valConvRate.length > 0 )
{
if (ValidateConvsionEx('convRate',true,'conversion rate'))
{
document.getElementById("AmtReturn").value =valAmtRefund*valConvRate;
}
}
}