Hi,
Every time I try to access the contents of the following array it returns that it is undefined. I have tried multiple variations on accessing the arrays syntax wise but get different errors every time.
When I try to do it the way listed below I get the undefined error I talked about before.
Code:
I realize the code above is ridiculously inefficient but I'm just trying to figure out what I'm doing wrong. Any suggestions?
Every time I try to access the contents of the following array it returns that it is undefined. I have tried multiple variations on accessing the arrays syntax wise but get different errors every time.
When I try to do it the way listed below I get the undefined error I talked about before.
Code:
Code:
var array = new Array();
var i, j, txt;
var str = new Array();
try{
array = document.tsv.read_in("u:\\test.txt");
for(i=0;i<array.length;i++)
str[i]=array[i];
for(i=0; i<array.length; i++)
array[i] = new Array();
}
catch(err)
{
txt="There was an error on this page.\n\n";
txt+="Error description: " + err.description + "\n\n";
txt+=err.stacktrace + "\n\n";
txt+=err.stack + "\n\n";
txt+="Click OK to continue.\n\n";
alert(txt);
}
for(i=0; i<array.length; i++)
{
var str2 = str[i];
var temp = str2.split("\t");
for(j=0;j<temp.length;j++)
{
array[i][j] = temp[j];
}
document.write(array[0][0]);
}
for (i=1;i<array.length; i++)
{
document.write("<div class=\"silverheader\" id=\""+i+"\"><a href="+i+">"+array[i][0]+"</a></div>");
document.write("<div class=\"submenu\">");
for(j=0;j<temp.length;j++)
document.write(array[i][j]+"\t");
document.write("</div>");
}
Comment