hello all, i have an error value / "NaN" value that's i;m not expecting of..
this is i how i check the for the value that's become "NaN"
[CODE=javascript]new Ajax.Request(ba se_url+'finance _control/cbh/recalculate_ite ms', {postBody: Form.serialize( 'newcbhForm'), onComplete: function(transp ort) {
data = transport.respo nseText.evalJSO N();
$('item_amount' ).innerHTML = data.amount;
max_cashbnknour ut = parseInt(data.m ax_cashbnknouru t);
if (isNaN(max_cash bnknourut) || isNaN(max_cashb nknourut)){
alert("Nan error");
}
}})[/CODE]
the max_cashbnknour ut is digit/numeric (0..10).
When i got "NaN" value, how can i make the value of max_cashbnknour ut become digit/numeric again??tks
regards,
maminx
this is i how i check the for the value that's become "NaN"
[CODE=javascript]new Ajax.Request(ba se_url+'finance _control/cbh/recalculate_ite ms', {postBody: Form.serialize( 'newcbhForm'), onComplete: function(transp ort) {
data = transport.respo nseText.evalJSO N();
$('item_amount' ).innerHTML = data.amount;
max_cashbnknour ut = parseInt(data.m ax_cashbnknouru t);
if (isNaN(max_cash bnknourut) || isNaN(max_cashb nknourut)){
alert("Nan error");
}
}})[/CODE]
the max_cashbnknour ut is digit/numeric (0..10).
When i got "NaN" value, how can i make the value of max_cashbnknour ut become digit/numeric again??tks
regards,
maminx
Comment