Code to hide multiple pop-ups at a time

Problem: I have 3 buttons on a page. All three buttons open 1 pop-up box each on clicking respective button. At a time I need to show only one pop-up.
Example: A, B, C are buttons. and 1,2,3 are popups. If I click A, popup 1 will be shown. at the same time, popups 2 and 3 will be hidden if already open. Now, what I have to do is add following:
For button A, show popup 1, hide pop-up 2, hide popup 3. Similarly, these things are required for button B and C. Is there any way where I can use toggle kind of function which will only show pop-up for the button I clicked. rest all pop-ups will be hidden. With my limited programming knowledge, I can’t think of anything.

ActivePresenter Version: 8


Hi Shri,

There is no need to use code to achieve what you want.
In the Events - Actions section of the button A/B/C, you will set events - actions as in the following image:
You can take look at the attached project for your reference:
Hide Multiple Pop-ups.approj (260 KB)
If you need further instruction, kindly let me know.


Thanks for quick solution and file. I have used the same technique throughout the document. The problem is I have about 350 slides. In about 15-20 slides, I have 25 such pop-ups on same slide. For this I have to set show/hide so many times. Can there be faster way you can suggest? In review cycles and product updates, number of pop-ups increase or decrease and it takes lot of time to check every slide.

Thank you.

Hi Shri,

Could you please share your project and its external data folder named PROJECT_FILE_files if any to so we can take a look at it?

If these files are large, you can upload them to a cloud storage site like Google Drive then email to us.


I’m sorry. Sharing the entire file will not be possible due to confidentiality reason. The request I want to make it is - If I gave 3 groups of pop-up boxes, there should be a command to keep all pop-boxes hidden unless clicked. Any toggle kind of mechanism should work. If you can help me with the JavaScript for such thing, it will not only help me but all users. Thanks!

Hi Shri,

Please take a look at the attached project for your reference:
multi popups.approj (284 KB).

To view Javascript code, click ActivePresenter button > Project > Properties > Event.
In the On Load event of a slide, add Execute Javascript action as in the following image:

Besides, kindly be reminded that you need to rename all buttons/ pop-ups following the same format: prefix_number
For example, Button_1/2/3/4… Popup_1/2/3/4…


Thank you so much. It will ease my life very much.