redho home | products | services
Web Design Forums

Web Design Forums  


Web Hosting, Web Design, Software and Web Development Forums  
 FAQFAQ   MemberlistArchive  Log inLog in   RegisterRegister 
         

problem with array length



 
Post new topic   Reply to topic    Web Design Forums -> JavaScript forum
View previous topic :: View next topic  
Author Message
Gladis



Joined: 24 May 2006
Posts: 108
I noticed that some of my arrays have a wierd length, it is bigger than whats in there. i have 2 elements in one right now, but length is 8
Why is that?
  Reply with quote


Jackil



Joined: 24 May 2006
Posts: 97
Try concatenating the values and alerting them, maybe that will give you an idea as to where its happening.
  Reply with quote
Gladis



Joined: 24 May 2006
Posts: 108
if i alert arr.length I get 7 but there is only one elemnt in the array
I use javascript debugger
  Reply with quote
Jackil



Joined: 24 May 2006
Posts: 97
What if you alert( arr[3] ); ?
  Reply with quote
Gladis



Joined: 24 May 2006
Posts: 108
I found my problem
I had a loop to create this multidemensional array. But i would not start with the [0] value when i created a new array. it was in a loop. so an array would just have vallue arr[8] and thats it. the length would be 9
  Reply with quote
Jackil



Joined: 24 May 2006
Posts: 97
nice.;)
  Reply with quote
Gladis



Joined: 24 May 2006
Posts: 108
I would have though length would be dynamic
But its not
Or a function, but its just a variable
  Reply with quote
Page 1 of 1
Post new topic   Reply to topic    Web Design Forums -> JavaScript forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group