Apply calculation to multiple forms with incrementing loop
Hello,
What on earth am I missing here?
I don't think foo and baa and being outputted correctly with the appropriate backslashes (escaping?).
when executed I need the calculate command to be applied as:
"Calculate","AFSimple_Calculate(\"PRD\", new Array (\"hx\", \"rx\"))");
above the
var targetArray = new Array("t1","t2","t3","t4","t5","t6","t7","t8");
for (i = 0; i < targetArray.length; i++){
var targetFields = this.getField(targetArray);
inc = i + 1;
var foo = "\"\h" + inc + "\"";
var baa = "\"\r" + inc + "\"";
targetFields.setAction("Calculate","AFSimple_Calculate(\"PRD\", new Array (foo, baa))");
};
Is it because foo and baa are not being pointed to their values from the 10th line?
Thanks Everyone!
M
