You are passing the client ID to the function Total. Then why you are creating another variable inside the function same like the variable you are passing?
function Total(TxtPPort, TxtBFPort, TxtLOPort, TxtTSPort) {
var TxtPPort = document.getElementById("TxtPPort");
var TxtBFPort = document.getElementById("TxtBFPort");
var TxtLOPort = document.getElementById("TxtLOPort");
var TxtTSPort = document.getElementById("TxtTSPort");
TxtTSPort.value = parseInt(TxtPPort.value) + parseInt(TxtBFPort.value) - parseInt(TxtLOPort.value);
}
See there. You passing TxtPPort to the function and again creating a
var TxtPPort
inside the function.
You can use
function Total(TxtPPort, TxtBFPort, TxtLOPort, TxtTSPort) {
var TxtPPort = document.getElementById(TxtPPort);
var TxtBFPort = document.getElementById(TxtBFPort);
var TxtLOPort = document.getElementById(TxtLOPort);
var TxtTSPort = document.getElementById(TxtTSPort);
TxtTSPort.value = parseInt(TxtPPort.value) + parseInt(TxtBFPort.value) - parseInt(TxtLOPort.value);
}
instead. Try that