• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: social Security Number - Validate

social Security Number - Validate 11 years 7 months ago #25047

  • jk8
  • jk8's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Dear forum friends,

I have a problem. I have a text field verify the social security number. Unfortunately, I just can not bring the javascript running in RSform.
Please Help.
Script:
 
 
function CheckSvnr2(svnum) 
{
var err=0;
if (svnum != "") 
{
if (err< 1) 
{
summe = 0;
faktoren = new Array(3,7,9,0,5,8,4,2,1,6);
svstellen = new Array(10);
for (var i=0;i< svnum.length;++i)
svstellen[i] = parseInt(svnum.substring(i,i+1));
for (var i=0;i< 10;++i)
summe = summe + (faktoren[i]*svstellen[i]);
var pruefz = summe % 11;
/*if(pruefz > 9) pruefz = 0;*/
if(pruefz != parseInt(svnum.substring(3,4))) err = 2;
}
}
if ( err > 0 ) {
//if (err==2)
if (err==2) document.form1.svnum.value ="";
alert ('FALSCH');
 
document.form1.svnum.focus();
return false;
//return false;
//return document.form1.svnum.value ="";
}
else
{
return true;
}
}
 

Best Regards,
Klaus
Last Edit: 11 years 7 months ago by octavian. Reason: This is an English forum!
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!