Widget:RimCalc: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 7: | Line 7: | ||
temp = (140 - parseInt($("#input2").val())) * parseInt($("#input1").val()); | temp = (140 - parseInt($("#input2").val())) * parseInt($("#input1").val()); | ||
console.log(temp); | console.log(temp); | ||
temp = temp / (parseInt($("#input3").val()) * 72) | temp = temp / (parseInt($("#input3").val()) * 72); | ||
console.log(temp); | console.log(temp); | ||
if ($("#input4").is(':checked')) { | if ($("#input4").is(':checked')) { | ||
Line 17: | Line 17: | ||
if(temp > 50){$("#output").append("<br />Regular Dose")} | if(temp > 50){$("#output").append("<br />Regular Dose")} | ||
else if(temp >= 30 || temp <= 50){$("#output").append("<br />250-500 mg q12h")} | else if(temp >= 30 || temp <= 50){$("#output").append("<br />250-500 mg q12h")} | ||
else if( | else if(temp <= 29){$("#output").append("<br />250-500 mg q18h")} | ||
//Don't touch! | //Don't touch! | ||
}); | }); |