modulo on big numbers
I've got an PDF form with formfields.
The code that i've got does work for small numbers but not for big numbers...
I'v got this code:
if(getField("TestIBAN").value == "")
event.value = 0;
event.value = (getField("TestIBAN").value % 97);
I've found a snippet on the web for big numbers but I don't know how to use them in the code above... Can someone help me?
"aNumStr" is the number (as string) you want to devide. "aDiv" is the number you want to devide by.
function modulo( aNumStr, aDiv)
var tmp = "";
var i, r;
for ( i=0; i<aNumStr.length ; i++)
tmp += aNumStr.charAt( i);
r = tmp % aDiv;
tmp = r.toString( 10);
return tmp / 1;
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)