I have the following lopp inside one of my scripts
document.getEle mentById('text' ).innerHTML = "";
for (i = 0; i < txtdef.length; i++) {
if (xx == txtdef[i][0]) {
if (yy == txtdef[i][1]) {
if (level == txtdef[i][2]) {
document.getEle mentById('text' ).innerHTML = "<P>" + txtdef[i][3] +
"</P>";
}
}
}
}
txtdef is an array. In this case, it only has about 4 rows, but there is
no theoretical limit. However, there is a noticeable delay in processing
when this sequence is triggered. I was wondering if there is a more
efficient way of writing this routine?
--
--
Fabian
Visit my website often and for long periods!
document.getEle mentById('text' ).innerHTML = "";
for (i = 0; i < txtdef.length; i++) {
if (xx == txtdef[i][0]) {
if (yy == txtdef[i][1]) {
if (level == txtdef[i][2]) {
document.getEle mentById('text' ).innerHTML = "<P>" + txtdef[i][3] +
"</P>";
}
}
}
}
txtdef is an array. In this case, it only has about 4 rows, but there is
no theoretical limit. However, there is a noticeable delay in processing
when this sequence is triggered. I was wondering if there is a more
efficient way of writing this routine?
--
--
Fabian
Visit my website often and for long periods!
Comment