Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

2 dimensional array

 
indu yeturu
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am creating a simple dynamic table like this,

and I created dynamic 2 dimensional array because I need to push the elements of the above table into particular arrays based on the [row,column] indices.
For that my code is ::::


Here am trying to display the value of each element,but it displays as 'undefined'.... What is the way to print the values of elements here?
thanks
indu
>
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You never assigned it a value so it is undefined. What would you expect it to alert?

Eric
 
indu yeturu
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There am expecting the value of the cell[i][j] where


i = 0 to rowlength
j = points to columns in the table(name,columns) j=0 to no.elements in the table;
no.of elements in the table is elements

The sample HTML :::



Sothat I tried to alert the values of the elements which I entered at specific row,column locations

 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And how are you sticking those values into the newly created arrays? You sample code shows nothing but creating arrays and alerting an empty cell.

Eric
 
indu yeturu
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks I got it..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic