First of all I am open to any suggestions and advice. If a javscript multidimensiona l array is a bad way to do this please say so. I considered XML but I wondered if this would be a bad idea as it would be slower for jsp to handel.
Okay here is an example of my multidimensiona l array (only part of it)(bottom of the post). It works fine I can call any of the 3rd dimension without trouble.
Now How would I go about printing something like this from the array:
[HTML]
<table><tr><t d colspan=2>1st dimension name</td></tr>
<tr><td>Secon d Dimension name</td><td>Third Dimension Property</td></tr></table>
[/HTML]
I guess what Im really asking is how to print the name of an array.
Obviously I can access the third dimension by just acessing array[0][0][0] however when I try return array[0][0] it just returns all the contents of [0][0] and not the name of [0][0] itself.
Not sure if I made that clear or not. Can I retrieve an array name somehow? (an array that is inside another arry)
Okay here is an example of my multidimensiona l array (only part of it)(bottom of the post). It works fine I can call any of the 3rd dimension without trouble.
Now How would I go about printing something like this from the array:
[HTML]
<table><tr><t d colspan=2>1st dimension name</td></tr>
<tr><td>Secon d Dimension name</td><td>Third Dimension Property</td></tr></table>
[/HTML]
I guess what Im really asking is how to print the name of an array.
Obviously I can access the third dimension by just acessing array[0][0][0] however when I try return array[0][0] it just returns all the contents of [0][0] and not the name of [0][0] itself.
Not sure if I made that clear or not. Can I retrieve an array name somehow? (an array that is inside another arry)
Code:
var css_properties = new Array(); var background = new Array; css_properties[0] = background; var border = new Array; css_properties[1] = border; var background_attachment = new Array(); css_properties[0][0] = background_attachment; css_properties[0][0][0] = 'scroll'; css_properties[0][0][1] = 'fixed'; var background_color = new Array(); css_properties[0][1] = background_color; css_properties[0][1][0] = 'custom'; css_properties[0][1][1] = 'transparent'; var background_image = new Array(); css_properties[0][2] = background_image; css_properties[0][2][0] = 'custom'; css_properties[0][2][1] = 'none'; var border_top_color = new Array(); css_properties[1][0] = border_top_color; css_properties[1][0][1] = 'custom'; css_properties[1][0][0] = 'transparent'; var border_top_style = new Array(); css_properties[1][1] = border_top_style; css_properties[1][1][0] = 'none'; css_properties[1][1][1] = 'hidden'; css_properties[1][1][2] = 'dotted'; css_properties[1][1][3] = 'dashed'; css_properties[1][1][4] = 'solid'; css_properties[1][1][5] = 'double'; css_properties[1][1][6] = 'groove'; css_properties[1][1][7] = 'ridge'; css_properties[1][1][8] = 'inset'; css_properties[1][1][9] = 'outset'; var border_top_width = new Array(); css_properties[1][2] = border_top_width; css_properties[1][2][0] = 'custom'; css_properties[1][2][1] = 'thin'; css_properties[1][2][2] = 'medium'; css_properties[1][2][3] = 'thick';
Comment