Copy link to clipboard
Copied
Hello everyone, it’s been a pretty long time since I made a cameo appearance. The last time I joined in the forum was back when the AcrobatUsers was the happening place for javascript stuff. Nice to be here. I’ve been searching for answers and help but so far nada.
What I’m trying to do is create a way to sketch a fence layout. I plan to have four lines of fence, Line A, Line B, Line C, and Line D. Each line will have three options. One that will have a single line of fence without any gate openings (which is where I’m presently up to). Then hidden on top of the single line of fence is a line that will have one gate opening. And then on top of those two lines another line hidden that will have two gate openings. That’s the three options.
I now have a popUpMenu. Prior to using the popUpMenu I used radio buttons to select the layout selections. But, now I’d like to switch to using the popUpMenu. I had it all figured out and working fine using the radio buttons but now the problem I’ve been having is showing and hiding the corner posts when changing 90 degree directions from the fence line which runs east/west to the line that runs north/south and so on. Here’s a sample of the script I was using to show/hide the corner posts: (For Fence Line A)
this.getField("Check Box1").display = (this.getField("NoSoWestLine”).display==display.visible) ? display.hidden : display.visible;
this.getField("Check Box2").display = display.hidden;
this.getField("Check Box3").display = display.hidden;
this.getField("Check Box4").display = (this.getField("NoSoEastLine”).display==display.visible) ? display.hidden : display.visible;
Check Box1 and 4 are the corner posts for Fence Line A. I made a text field readOnly and the Border a black line set to Underline. Works well to indicate a fence line from Box1 to Box4.
What I’ve been trying to do now is when the field named Fence Line A is showing also show Box1 and Box4. But, I can’t figure out Box4 is also needed for Fence Line B and so on Box7 and Box10. The problem occurs when I want to clear each line. The Box1 button will stay visible when it should not for Fence Line D. I haven’t gotten to Fence Line B yet. Just a bit more info, there’s another field which counts the visible terminal posts. So, in order to keep the count accurate I need to show the Boxes correctly.
Can someone come to my rescue? Can this be done? I’ve been spinning my wheels for about two weeks now and just can’t get it right. I would appreciate any help. Thanks folks. This was the short version.
Copy link to clipboard
Copied
Hi,
It would be a lot easier to visualize the desired workflow and be able to assist you if you can share a copy of the PDF.
Copy link to clipboard
Copied
Thanks for getting back to me. I agree having a copy of my PDF project would be helpful but it's under construction and is so unorganized at this point. It's such a mess. But, you can see the script. That's the main thing. My problem is that I don't understand it and how it works. Sometimes I catch on just by trial and error. But, that's just luck. I just don't know enough about javascript. Those darn corner posts give me such grief. When I clear LineA then LineB and LineD posts disappear. Keep in mind I'm making a four sided fence layout. I can't simply show/hide the posts. It has something to do with, if LineA is hidden then the posts for LineB would be visible (and so on). I can try to explain it but I don't have the time. I mean the time I have left. I'm probably the oldest member and I play around with the Acrobat program to keep from watching TV. Again, thanks for taking the time to read my short post. hahahaha.