Preserved Topic: JavaScript Array Length detection (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: Manchester |
posted 05-09-2002 20:14
Hello, |
Bipolar (III) Inmate From: dk's house of love |
posted 05-09-2002 20:25
code: if(myarray.length > 4)
|
Bipolar (III) Inmate From: Manchester |
posted 05-09-2002 22:45
I know I have tried that, but it does not return the correct array length. It is probably something I am doing wrong. The array I am reading the length from is added to by a for loop but I am pretty sure that it is not in-accurate. |
Paranoid (IV) Inmate From: A graveyard of dreams |
posted 05-09-2002 22:49
Would be easier if you gave us a link to were the problem is |
Bipolar (III) Inmate From: Manchester |
posted 05-10-2002 17:18
I have figured it out now. I was being soo stupid. The array I was reading from got added to by a function which took the element number from the onClick event. So for example if the element number assigned to the particular onClick event was 23 then it made the array length 23! So even though I had only added 4 peices of data it made the array length 23. :-) |