A
Andy Fish
Hi,
Can someone explain why this works:
for (i=0; i<document.form1.radiogroup.length; i++) {
var myRadio = document.form1.radiogroup;
}
but this does not:
for (i in document.form1.radiogroup) {
var myRadio = document.form1.radiogroup;
}
I'm sure this is down to a simple lack of understanding on my part. I have
hunted round all the w3c recommendations for DOM and HTML and the ECMAScript
bindings, but I can't find anything that properly explains the programming
model for radio groups. Have I missed something?
Andy
Can someone explain why this works:
for (i=0; i<document.form1.radiogroup.length; i++) {
var myRadio = document.form1.radiogroup;
}
but this does not:
for (i in document.form1.radiogroup) {
var myRadio = document.form1.radiogroup;
}
I'm sure this is down to a simple lack of understanding on my part. I have
hunted round all the w3c recommendations for DOM and HTML and the ECMAScript
bindings, but I can't find anything that properly explains the programming
model for radio groups. Have I missed something?
Andy