On Mar 31, 2004, at 11:15 AM, kc wrote:
"ReferenceError: i is not defined."//this loop will make f1.options run from f1.options[0] to f1.options[length of options]
f1 = this.getField("sponsor");
f2 = this.getField("dmm1").value;
f3 = this.getField("dmm2").value;
f4 = this.getField("dmm3").value;
var fieldOne = "sponsor."; //why?
for (var i = 0; i < f1.options.length; i++) { // eliminate the "o" before f1. You had "of1," and that isn't defined, either.
if (f1.options[i].selected) { // don't know if this is correct or not.
if (f2.value == "") f2.value = f1.options[i];
else if (f2.value != "" && f3.value == "") f.value = f1.options[i];
else if (f2.value != "" && f3.value != "" && f4.value == "") f.value
= f1.options[i];
else app.alert("All fields are full");
}
}
Jim Plante
<[EMAIL PROTECTED]>
