set multiple buttons to show/hide easily

Explorer ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

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?

TOPICS
How to, Scripting

Views

166

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Feb 23, 2021 Feb 23, 2021
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...

Likes

Translate

Translate
Adobe Community Professional ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

Hi,

 

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

 

Malcolm

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

Please find attached indesign file and pdf.

 

Only concern is to hide already opened buttons, when another button is clicked.

 

Thank you!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 22, 2021 Feb 22, 2021

Copy link to clipboard

Copied

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!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 22, 2021 Feb 22, 2021

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 23, 2021 Feb 23, 2021

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 23, 2021 Feb 23, 2021

Copy link to clipboard

Copied

I'm going to double down on my suggestion. This would be better done as a website. Getting this to work in a PDF is going to be nearly impossible and certainly can't be done with InDesign.

If you insist on going forward with this, you should visit the Acrobat forum to see if anyone there can guide you through it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 23, 2021 Feb 23, 2021

Copy link to clipboard

Copied

LATEST

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 22, 2021 Feb 22, 2021

Copy link to clipboard

Copied

Sounds like your client needs a website. If they insist on PDF it's essential that educate yourself on the pitfalls here so you can educate them.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines