I have the following javascript:
function add_repair_costs(x) {
isMoneyRemove(x)
var repair_cost = 0;
if (document.getElementById('PS_FORM/REPAIR_ADDENDUM/Repair_Cost1').value) {
if (isnumeric(document.getElementById('PS_FORM/REPAIR_ADDENDUM/Repair_Cost1').value)) {
repair_cost = repair_cost + parseInt(document.getElementById('PS_FORM/REPAIR_ADDENDUM/Repair_Cost1').value);
alert(repair_cost);
}
}
and so on
the call:
$ <input type="text" style="width:100px;" value="{{PS_FORM/REPAIR_ADDENDUM/Repair_Cost1}}" name="PS_FORM/REPAIR_ADDENDUM/Repair_Cost1" id="PS_FORM/REPAIR_ADDENDUM/Repair_Cost1" onclick="add_repair_costs(this);" onblur="FormatMoney(this);" />
the format money is a function that puts commas and stuff into it.
so what it is doing is when i enter values into the input text boxes it formats it to money but my call has a function that removes the formating to do the math. However when it calls the add repair costs function if the value is in the thousands it will run on the intial on blur but if you goto the next input box the preceeding value only reads the number until it hits the "," in the input.
for instance:
input: reads as: 1 1 123 123 1,234 1234 on initial then back to 1
so if i have 3 input boxes it will do this:
input 1: 1 input 2: 1,234 input 3: 123 will read as follows: 1 1234 123 then when you click off of input 3 1 1 123
it does that after every thousands input on various input locations

New Topic/Question
Reply



MultiQuote





|