Introduction
I need to calculate given two numbers in two td elements in my table.
My table looks like this:
I need to do the following calculation and put result in hours used automatically.
The relevant calculation is found below, and is hardcoded into the hours used column for now, since I don't know how to do it through the user input in Prognose exp and Prognose mail
var th = document.createElement('th');
th.className = "hours_used";
var text = document.createTextNode("Hours used")
th.appendChild(text);
row.appendChild(th);
var th = document.createElement('th');
th.className = "prognose_eks";
th.id = "digit_fast_header"
var text = document.createTextNode("Prognose exp")
th.appendChild(text);
th.style.display = "none";
row.appendChild(th);
var th = document.createElement('th');
th.className = "prognose_mail";
th.id = "digit_fast_header"
var text = document.createTextNode("Prognose mail")
th.appendChild(text);
th.style.display = "none";
row.appendChild(th);
var td = document.createElement('td');
td.className = "hoursUsed";
td.innerHTML = "<input type='number' disabled='disabled' id='result'>"
tr.appendChild(td);
var td = document.createElement('td');
td.className = "inputEks";
td.id = "inputEks"
td.innerHTML = "<input type='number' class='input1' name = 'inpt[]' >";
tr.appendChild(td);
var td = document.createElement('td');
td.className = "inputMail";
td.id = "inputMail"
td.innerHTML = "<input type='number' class='input2' name = 'inpt[]' >";
tr.appendChild(td);
var GNS_EKS_TIME = 9;
var GNS_MAIL_TIME = 9;
TimeSum = (("#inputEks") / GNS_EKS_TIME) + (("#inputMail") / GNS_MAIL_TIME)
console.log("########### TEST ##############" + parseInt(TimeSum))
alert("Test" + TimeSum)

jqueryandcsstags? There's no jQuery in the script, nor has this problem anything to do with CSS.