Using loops within loop statements
Posted: Sat Sep 20, 2003 6:44 am
I'm trying to use multiple loops within other loops using arrays, for some reason it refuses to call the second array.
The arrays:
Now the looping:
Any ideas would be great
but I don't see why the above code wouldn't work, it should be possible.
--lunartek
The arrays:
Code: Select all
soptions = new Array(
"Acceleration|sacceleration", "Angle|sangle"
);
sacceleration = new Array(
"Acceleration of Free Fall|9.80665", "Galileo|0.01"
);Code: Select all
function select(selopt,selname){
document.write("<SELECT NAME="+selopt+"><option selected>"+selname+"</option>");
for(value in soptions){
document.write("<option>-- "+soptionsїvalue].split("|")ї0]+"</option>");
for(value2 in soptionsїvalue].split("|")ї1]){
document.write("<option> "+soptionsїvalue].split("|")ї1]їvalue2].split("|")ї0]+"</option>");
}
}
document.write("</SELECT>");
}Any ideas would be great
--lunartek