I have been working on a 2-page document, recently, where the content of the bottom half of page 2 is determined by a script attached to a combobox on page one. The perform for the combobox goes like this:
this.findOCG("set1").state = false; ... if(this.getField("SelectBox").value == "set1"){ this.findOCG("set1").state = true; this.showSet1();} ...
And so on for all 4 sets. I have two functions for each set, showSetX() and hideSetX(). showSetX() first calls the hideSet() for the other sets, then switches the text fields in question to visible:
function showSet1(){ this.hideSet2(); ... this.getField("Set1Box1").hidden = false; ...}
and so on, calling the other hideSet functions and switching all the fields specified to visible. hideSet is essentially the same function, except it does not call any other function, and turns the specified fields to hidden.
Under any circumstances, switching layers through findOCG works perfectly. Layers switch. When I put set boxes in areas where they don't physically overlap, everything works fine (selecting Set 1 from the box switches off all layers and then makes layer "Set1" visible, switching off all fields and makes those fields in showSet1() visible; so on for the other sets).
However, my purpose is to create the illusion of fields that are only present on certain layers (different configurations of the form), and in order to do that, the fields need to be physically overlapping, often on top of each other. Acrobat seems to have real problems with this, as no matter what the box says, it will continue to display only the fields that are "on top." if the fields "on top" are set to hidden, it will simply display neither field, even if the field "under" it is set to visible.
So, my question is, is there anything I can do to get acrobat to display my fields the way I have the javascript set up? Or does stacking them on top of each other always break the process? Is this something that would be possible in Acrobat 9? Is it possible to have a third, hidden, non-printing page full of fields and then use the javascript to move them into position before making them visible and then move them back to the hidden page after making them hidden? I am really quite lost at this point. Thanks for the help.
The hidden field property has been deprecated and you should use the display property instead, though this probably isn't the cause of your problem.
Is there any chance we can look at this form?
George