Looking for assistance here. leveldrop and result level throwing out NaN. Is there a syntax or operators error somewhere?
function calculateLeveldrop() {
var spl = Number($('#txtleveldrop_spl').val());
var dist = Number($('#txtleveldrop_dist').val());
var leveldrop;
var resultlevel;
if (spl == "") {
$('#txtleveldrop_spl').html("-");
return;
}
if (dist == "") {
$('#txtleveldrop_dist').html("-");
return;
}
leveldrop = 20 * (Math.LOG10) + dist;
leveldrop = (leveldrop).toFixed(2);
resultlevel = spl - leveldrop;
resultlevel = (resultlevel).toFixed(2);
$('#spnleveldrop_Result').html(leveldrop);
$('#spnresultinglevel_Result').html(resultlevel);
}