Can anyone help me out with making this script turn off the fields ONLY ON THE PAGE THAT THE CALLOUT 1 FUNCTION REFERENCES?
// Function for CALLOUT 1
function callout1(){
this.gotoNamedDest('view_01'); // THIS IS THE PAGE THAT I WANT THE FIELDS HIDDEN ON
onlygrid(17); // THIS IS THE FUNCTION THAT HIDES ALL OF THE FIELDS
var Callout = "Callout 1";
var PasteFirst = "Paste 1st (Data)";
var ocgArray = this.getOCGs(this.pageNum);
for ( var i=0; i < ocgArray.length; i++) {
if ( ocgArray[i].name == Callout ) {
ocgArray[i].state = true;
}
else ocgArray[i].state = false;
}
for ( var z=0; z < ocgArray.length; z++) {
if ( ocgArray[z].name == PasteFirst ) {
ocgArray[z].state = true;
}
}
}
I'm thinking maybe there is a way to tie this...
this.gotoNamedDest('view_01');
to this....
onlygrid(17);
So it will only hide the fields at the destination view_01
Please help...last piece of my puzzle! :)
So this:
if ( ocgArray[i].name == Callout ) {
Should be this:
if ( ocgArray[i].name == "Callout" ) {
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com