F
Fabian
I have the following lopp inside one of my scripts
document.getElementById('text').innerHTML = "";
for (i = 0; i < txtdef.length; i++) {
if (xx == txtdef[0]) {
if (yy == txtdef[1]) {
if (level == txtdef[2]) {
document.getElementById('text').innerHTML = "<P>" + txtdef[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?
document.getElementById('text').innerHTML = "";
for (i = 0; i < txtdef.length; i++) {
if (xx == txtdef[0]) {
if (yy == txtdef[1]) {
if (level == txtdef[2]) {
document.getElementById('text').innerHTML = "<P>" + txtdef[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?