https://***REDACTED***/buynow.html is the page that is not working correctly.
function totalamountdue() { var inputs = document.getElementsByTagName("INPUT"); var runningTotal = 0; for (i = 0; i < inputs.length; i++) { if (inputs[i].id == "total") { inputs[i].value = runningTotal } if (inputs[i].id.indexOf("amount") == 0) { if (/^[1-9][0-9]{0,2}(,[0-9]{3})*(\.[0-9]{2})?$/.test(inputs[i].value)) { runningTotal += +inputs[i].value; } else { if (inputs[i].value == "THIS IS A BAD VALUE") { inputs[i].value = ""; } if (inputs[i].value) { inputs[i].value = "THIS IS A BAD VALUE"; } } } } }
if (/^[1-9][0-9]{0,2}(,[0-9]{3})*(\.[0-9]{2})?$/.test(inputs[i].value))
if (!isNaN(parseFloat(inputs[i].value)) && isFinite(inputs[i].value))
Quote:I have an amount field being limited to only 3 digits.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)