Hello I have been struggling with a small problem for a few days. I have a group of fields. listed as tl.1 tl.2 etc
I needed to go have a test field where when i entered input in numeric between 1 -10 the fields TL1 - TL10 will either stay blank or be filled with NA
example if I entered 2 in my field the remaining fields 3 -10 will all be filled with NA
I have gotten this far but I am fallinjg short somewhere any assistance will be valuable
function fieldLoop()
{
var e= event;
var myArray = new Array ("c5cmProximal","c1cmProximal", "c2cmwithin","c4cmwithin","c6cmwithin","c8cmwithin","c10cmwithin","c18cmwithin","c20cmwithin","c1cmdistal","c5cmdistal");
var dropDownValue = e.target.value;
for (i=1;i<=10;i++) {
for (y in myArray) {
var myfield1 = myArray[y] + "edvTL." + i;
var myfield2 = myArray[y] + "psvTL." + i;
if (i >= dropDownValue ) {
myfield1.target.value = "NA";
myfield1.hidden = true;
myfield1.borderColor = color.red;
app.alert(myfield1 + " is a field that will be read only set with a value NA. Value will be read only");
// e.value.y = "NA";
}
}
}
}
{
var e= event;
var myArray = new Array ("c5cmProximal","c1cmProximal", "c2cmwithin","c4cmwithin","c6cmwithin","c8cmwithin","c10cmwithin","c18cmwithin","c20cmwithin");
var dropDownValue = e.value;
for (i=1;i<=10;i++) {
for (y in myArray) {
var myfield1 = myArray[y] + "edvTL." + i;
var myfield2 = myArray[y] + "psvTL." + i;
if (i != dropDownValue ) {
app.alert(myfield1 + " is a field that will be read only. Value will be read only and set to NA");
e.value.myfield1 = "NA";
}
}
}}