Skip to main content
Participating Frequently
February 19, 2021
Answered

set multiple buttons to show/hide easily

  • February 19, 2021
  • 2 replies
  • 2190 views

I have this situation where I have 6 buttons and each will open a pop-up box (with of course another set of buttons). Problem is, if user clicks one button and its pop-up box is open (10 new buttons), instead of selecting anything from it, if he clicks another button (one of the 6 main page buttons), another pop-up box opens and overlaps the previous (pop-up) buttons.

 

So it must be set in a way that whenever a button is clicked, it closes all the existing pop-up boxes. But doing that manually  is tiresome. In this case it would be going to a button, finding all the buttons which do not belong to its pop-up box, and hiding them. That is already 6 X 5 X 10 clicks for one page and my document contains 100 pages.

 

So i was wondering if there is a way to select multiple buttons or layers, and set them to show/hide for that particular button? Instead of going into every button and hiding all unwanted buttons one by one?

This topic has been closed for replies.
Correct answer BarlaeDC

Hey Malcolm,

 

Thanks again! Actually it is not just fields, but some images (actually alot of them) too which need to be controlled using JavaScript. Such implementation, would it be possible in Adobe Acrobat?

 

Idea is, when user clicks one of 6 boxes on a page, a new panel (pop-up) opens with certain 10/15 images, and then user can select any of those and that image appears in the box where user clicked. And it goes on for all boxes on that page. Boxes on different pages have their own set of selection images (as pop-up) to be selected from. And it goes on for all 100 pages.

 

I would like to know what would you suggest.

 

Jamal


Hi,

 

I agree with @BobLevine PDF is not the best solution for this, Can it be made to work, probably. Would it be easy, probably not. It was also be likely to break if it is opened in any PDF viewer that is not Acrobat/Reader.

 

The images would have to be stored in a manner that Acrobat could control, and there would be a lot of scripting to make it work.

 

If any image changes or is added then we would have to re-add it to PDF and probably have to change the scripts.

 

I did not realise there was such a demand on the interactive part, I thought there was 9 or 10 buttons, with 9 or 10 options, but as this is not the case it would be very hard to make this work ( and be usable in a PDF).

 

Malcolm

2 replies

BobLevine
Community Expert
Community Expert
February 19, 2021

What is the goal here? PDF? Forget it.

This will fail more times than it will succeed (it will certainly be a failure in anything other than Acrobat) and you'll have nothing but pain making sure things don't overlap and interfere with other interactivity.

If you're going for Publish Online or Fixed Layout EPUB, use a multistate object.

Jamal5C69Author
Participating Frequently
February 22, 2021

Unfortunately, Yes, Client strictly wants PDF and i couldn't sold EPUB to him. Actually, document also has some text fields which user can fill (just like a fillable PDFs) and since that is impossible in EPUBs, we had to go with PDFs anyway.

 

Thanks for response!

BarlaeDC
Community Expert
Community Expert
February 22, 2021

Hi,

 

This can be done using Adobe Acrobat, so you create the fields in Acrobat rather than InDesign, then we can use JavaScript to control the show/hide of the fields, if you want help I can provide that?

 

Malcolm

BarlaeDC
Community Expert
Community Expert
February 19, 2021

Hi,

 

I am having some issues understanding the problem, can you provide a sample document that shows the problem?

 

Malcolm

Jamal5C69Author
Participating Frequently
February 19, 2021

Hello Malcolm,

 

Thank you for your response.

 

Please have look at short clip attached. At the end where buttons of one box overlap those of another, if one is already opened. That is the issue I am talking about.

 

And only solution seems to be is to go to that button and hide all the other buttons one by one, which is cumbersome. So I was looking for an efficient way to resolve that.

 

Regards,

Jamal

BarlaeDC
Community Expert
Community Expert
February 19, 2021

Hi,

 

Many thanks for the video, but I cannot help until I can see a sample document, I need to be able to see how you have implemented the show/hide and then see if I can modify that code to solve the problem.

 

Malcolm