I have created a function that when the use fills in the two inputs comm and hour it populated the result in another input called phone.
calculate = function()
{
var comm = document.getElementById('comm').value;
var hour = document.getElementById('hour').value;
document.getElementById('phone').value = Math.round(comm*hour*phone/60);
}
At the moment if you type in comm and hour and then you click outside the input it calculates the result in phone.
What I am trying to achieve is to calculate at the moment you type on any of the two fields.
I have tried to find something that can help me here, but with no luck. Any advice?