I am very new to javascript. My goal is to convert my excel sheet into javascript. I want to forecast preventive maintenance and display running hours and maintenance kits. if somebody could point me in the right direction would be appreciated.
I am calculating: daily running hours (max. 24 hours) multiplied by years(max 5 years). The result = total running hours. I want to display the running hours and kits dynamically. For better understanding of my goal, please see below screenshot from my excel sheet.. I also included a screenshot of the maintenance hours as the maintenance kits are repeated on certain hours.
I prepared a fiddle where i started with the simple hour calculation. How can i display the maintenance hours and kits dynamically depending on total hours?
$(document).ready(function() {
$(".calculate").click(function() {
var d = $('input[name="duty"]').val();
var y = $('input[name="year"]').val();
var total = d * y * 365;
$('.result').val(total);
var a1 = 1000;
var ab1 = 2000;
var abc1 = 4000;
var abcd1 = 16000;
var abcde1 = 32000;
});
});
I just would need a pointer in the right direction please.
Best regards Pascal
Comments
Post a Comment