Not every table entry needs to be defined. A table element entry can have multiple entries. An entry consists of two values. A text and the link for the text.

The html-table is already defined. Now I want to fill it with the values (links) above.

My problem is, how to create an efficient data structure so that I easily can find table-positions that have entries (maybe without looping 10 rows 10 columns). For each entry I want to get the list of texts + links.

And how to access/read each entry of my definition. (I have no problem placing the value to my html-table.)

I'd really apreciate if someone could give me some code-example how to set up such a data structure.

Your second example is what I was already experimenting with. I have no problem attaching a simple string e.g. "table[1][3] = "hello world";". But I have my problems attaching an array. I tried with table[1][3] = new Array( new Array( 'text1', 'link1'), new Array( 'text2', 'link2' ) ); but I do not know how to access the values... Btw, instead of "new Array()", can I also write [ a, b ]?
–
EnkiduDec 10 '11 at 12:11

This looks really smart! :) But my problem is that I do not want to access a certain field in the table but to just get the values of the fields defined. (There are maybe only 20 of 100 with values.)
–
EnkiduDec 10 '11 at 12:18

The other answers seem to suggest placing dummy Arrays as placeholders for coordinates that are unused. This -- while it is not wrong -- is unnecessary: if you set an entry on an Array in JavaScript whose index exceeds the current range the Array is essentially padded with undefined values.

var a = [ ] ; // a length is 0
a[1024] = 1 // a length is now 1025, a[1] is undefined