HighDots Forums  

IBAN überprüfen

Javascript (German) Programmiersprache JavaScript. (de.comp.lang.javascript)


Discuss IBAN überprüfen in the Javascript (German) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gerd Wagner
 
Posts: n/a

Default IBAN überprüfen - 10-31-2009 , 06:09 AM






Na Hola!

Weiss hier jemand zufällig, wie man per JavaScript-Funktion eine IBAN-
Nummer (International Bank Account Number) prüfen kann? Für PHP hab
ich dieses funktionierende Snipplet hier gefunden:

function IBANTest($iban)
{
$iban=str_replace(' ','',$iban);
$iban1=substr($iban,4).strval(ord($iban{0})-55).strval(ord($iban
{1})-55).substr($iban,2,2);
$rest=0;
for($pos=0;$pos<strlen($iban1);$pos+=7){$part=strv al($rest).substr
($iban1,$pos,7);$rest = intval($part)%97;}
$pz=sprintf("%02d", 98-$rest);
if(substr($iban,2,2)=='00'){return substr_replace($iban,$pz,2,2);}
else{return ($rest==1) ? true : false;}
}

Leider bin ich nich so fit, um das in JS zu "übersetzen".

Liebe Grüße,

Gerd Wagner

Reply With Quote
  #2  
Old   
Thomas Braun
 
Posts: n/a

Default Re: IBAN überprüfen - 11-02-2009 , 03:40 AM






Gerd Wagner wrote:

Quote:
Weiss hier jemand zufällig, wie man per JavaScript-Funktion eine IBAN-
Nummer (International Bank Account Number) prüfen kann?
[...]

....hier

http://www.google.de/search?q=iban+validierung+javascript

findest du nix? (würde mich wundern)

Grüße
Thomas

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.