Hi. IE has been throwing up an error on the following function. The function which is called when a user clicks on a letter img in the body of the page.
eg:
<a href="javascript

rint(0)">A</a>
<a href="javascript

rint(1)">B</a>
etc.
the function then prints the contents of the inner array to a specific div.
It's all working fine except for an error in IE:
'myArray[..][..].0' is null or not an object
I just can't seem to get rid of this error. Here's the code:
var myArray= new Array()
myArray=[
[["amy","21312"],["andy","343423"],["andrew","21312"]],
[["bmy","21312"],["bandy","343423"],["bandrew","21312"]],
[["cmy","21312"],["candy","343423"],["candrew","21312"]]
]
var i;
var j;
function print(j){
document.getElementById('test').innerHTML = '';
var root = document.getElementById('test');
for (i=0; i<myArray.length; i++){
var a = document.createElement('a');
var n = document.createTextNode(myArray[j][i][0]);
var br = document.createElement('br');
a.setAttribute('href',myArray[j][i][1]);
a.setAttribute('target','_blank');
a.appendChild(n);
root.appendChild(a);
if(i<myArray.length-1){
root.appendChild(br)
}
}
}
thanks for taking the time.