javascript multidimensional array?
Posted
by megapool020
on Stack Overflow
See other posts from Stack Overflow
or by megapool020
Published on 2010-03-27T15:43:03Z
Indexed on
2010/03/27
15:53 UTC
Read the original article
Hit count: 196
JavaScript
|array
Hi there,
I hope I can make myself clear in English and in what I want to create. I first start with what I want.
I want to make a IBANcalculator that can generate 1-n IBANnumbers and also validate a given IBANnumber. IBANnumbers are used in many countries for payment and the tool I want to make can be used to generate the numbers for testing purpose.
On wikipedia (Dutch site) I found a list with countries and their way of defining the IBANnumber. What I want to do it to make a kind of an array that holds all the countries with their name, the code, there IBANlength, the bankingformat and the account format.
The array needs to be used to:
- Generate a select list (for selecting a country)
- used to check part for generating numbers
- used to check part for validating number
I don't know if an array is the best way, but that's so far the most knowledge I have.
I allready made a table like this that holds the info (this table isn't used anyware, but it was a good way for me to show you what I have in mind about how the structure is):
<table>
<tr>
<td>countryname</td>
<td>country code</td>
<td>valid IBAN length</td>
<td>Bank/Branch Code (check1, bank, branch)</td>
<td>Account Number (check2, number, check3)</td>
<tr>
<tr>
<td>Andorra</td>
<td>AD</td>
<td>24</td>
<td>0 4n 4n</td>
<td>0 12 0 </td>
<tr>
<tr>
<td>België</td>
<td>BE</td>
<td>16</td>
<td>0 3n 0 </td>
<td>0 7n 2n</td>
<tr>
<tr>
<td>Bosnië-Herzegovina</td>
<td>BA</td>
<td>20</td>
<td>0 3n 3n</td>
<td>0 8n 2n</td>
<tr>
</table>
and many more ;-)
I hope someone can help me with this. Tnx in advance
© Stack Overflow or respective owner