var a = Number(document.getElementById("txtBoxA").value || 0);
var b = Number(document.getElementById("txtBoxB").value || 0);
var c = Number(document.getElementById("txtBoxC").value || 0);
And as one of those annoying Chief Software Architect types of malcontents I also need to say things like this:
1) Best practice is to attach a listener to an element in a separate script file, and put the rest of the code in the file as well. Don't use onchange and other inline code unless you absolutely can't avoid it.
2) Use namespaces. Although it may be unlikely that anyone else has a function named "UpdatePOBTotal", it's not impossible. Better to do something like this:
window.MyNamespace = {};
MyNamespace.updatePOBTotal = function()
{
...
}
// And then in the call to it:
MyNamespace.updatePOBTotal();
3) Don't name your functions like classes. Classes start with uppercase, functions start with lowercase.
4) It's also a good idea to keep your references instead of calling getElementById all the time:
// during initialization
MyNamespace.txtBoxA = document.getElementById("txtBoxA");
// later on in the function
var a = MyNamespace.txtBoxA.value;