I checked my condition and if statement and should be correct since , If there is value for both fields from user , the first condition is executed and show alert "first checking pass", then in the 2nd condition if the value of the 1st field is larger than the 2nd field , it will show the value for both field and show alert , but my issue is when the value for 1st fields only in the hundreds of thousands,it worked correctly and while if the value for 2nd fields is in million digit, then it will fail the 2nd condition below are the codes :
if(f.__CshWdlMinAmt.value!=0 && f.__CshWdlPerTrxnLmt.value!=0 ){
alert("first checking pass");
if(f.__CshWdlMinAmt.value > f.__CshWdlPerTrxnLmt.value) {
alert(f.__CshWdlMinAmt.value + f.__CshWdlPerTrxnLmt.value);
alert("second checking pass");
f.__CshWdlMinAmt.focus();
return false;
}
}
alert("no need checking");
And below are the screenshot of the results : this is when the 1st fields is in million digit
this is when the 1st fields is in hundredsk digit or lower
please help, thank youuu
Aucun commentaire:
Enregistrer un commentaire