Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling multi dimentional arrays 1

Status
Not open for further replies.

Ovatvvon

Programmer
Feb 1, 2001
1,514
US
Hello, I am trying to make an array of arrays, and calling the information as needed. Each category has two sub-categories. Here is an example of one category and it's subcategories...
Code:
var arrNoteType = new Array();    <!-- category 1 -->
    arrNoteType[0] = ("Claims Issues",19);
    arrNoteType[1] = ("Client Policies",23);
    arrNoteType[2] = ("Loss History Requests",21);
    arrNoteType[3] = ("Return to Work",20);
    arrNoteType[4] = ("Risk Control",22);
    arrNoteType[5] = ("General",6);

alert(arrNoteType10[4][1]);

I would think the above would popup an alert box with the text reading either "Risk Control" or "22", but instead, I receive "undefined". Obviously I'm doing something wrong when calling specific items in the list.

Can anyone tell me what is the proper way to do this?


-Ovatvvon :-Q
 
Code:
var arrNoteType = new Array(6);    <!-- category 1 -->
    arrNoteType[0] = ["Claims Issues",19];
    arrNoteType[1] = ["Client Policies",23];
    arrNoteType[2] = ["Loss History Requests",21];
    arrNoteType[3] = ["Return to Work",20];
    arrNoteType[4] = ["Risk Control",22];
    arrNoteType[5] = ["General",6];

alert(arrNoteType10[4][1]);
 
Oddest posting I've seen in a while! Gave me a chuckle.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top