I have some code that I was using to generate a calculation from two inputs but am having trouble generating the result I need.
I have two inputs (let's call them input1 and input 2). When you enter in a value, it calculates it based on the following:
(input1 x 0.156$) x ( (input2 x 15 seconds) x 4.2) x 12 months
My original code is as follows:
var calculation = function() {
var input1 = document.getElementById('people').value;
var input2 = document.getElementById('stories').value;
var result = Math.floor(input1 * 0.2 * input2 * 30);
document.getElementById('result').innerHTML = result;
return false;
}
It's the var result that I'm having difficulty changing (the code above was for a different calculation). Any help would be greatly appreciated!