Hide show layers across several pages using dropdown selection
I've created a PDF document containing serveral posters which all contain an area for a departmental branding. I want to be able to change the branding information across all of the pages in one hit by selecting the department from a (non printing) dropdown box.
I've managed to achieve this on a single page by using layers and the following javascript to show/hide the different departments. However, this doesn't change the layer visibility across all of the pages. Does anyone out there know how this can be done or if it's even possible?
var layers = ["Dept1","Dept2","Dept3","Dept4","Dept5","Dept6"];
var docOCGs = this.getOCGs();
for( i=0 ; i<docOCGs.length ; i++){
var val = layers.indexOf(docOCGs[i].name);
if(val >=0){
layers[val] = docOCGs[i];
}
}
function SetFieldValues (item){
for( i=0 ; i<layers.length ; i++){
layers[i].state = false;
if(layers[i].name == item){
layers[i].state = true
}
}
}
SetFieldValues (this.getField("select").value);
