R
Ramon F Herrera
Hello,
I have a table whose entries are not all defined. My current code
looks like this:
var shouldHide = noEarnings.isBoxChecked(0);
for (var i = 0; i < rows; i++)
for (var j = 0; j < 2; j++)
if ((i!=3 || j!=1) && (i!=4 || j !=1) && (i!=6 || j!=1)) //
<-- These are the undefined entries
amountTable[j].hidden = shouldHide;
else
console.println("Table " + (i+1) + ", " + (j+1) + " is
undefined");
Naturally, I would like to write more general code, checking whether
the entry exists before trying to [un]hide it.
TIA,
-Ramon
ps: This is JavaScript for Acrobat forms.
I have a table whose entries are not all defined. My current code
looks like this:
var shouldHide = noEarnings.isBoxChecked(0);
for (var i = 0; i < rows; i++)
for (var j = 0; j < 2; j++)
if ((i!=3 || j!=1) && (i!=4 || j !=1) && (i!=6 || j!=1)) //
<-- These are the undefined entries
amountTable[j].hidden = shouldHide;
else
console.println("Table " + (i+1) + ", " + (j+1) + " is
undefined");
Naturally, I would like to write more general code, checking whether
the entry exists before trying to [un]hide it.
TIA,
-Ramon
ps: This is JavaScript for Acrobat forms.