Javascript toolbox triggers not defined

Hey guys, not sure what is going on here but for whatever reason (this was working) i cant get a reusable element on a page with a button to trigger another reusable element on the same page to open. I get a general error.

“Bug in custom code ReferenceError: bubble_fn_pop is not defined”

am i doing something silly/gone blind/stupid?

I am not trying to do anything special, no data at this stage, just trigger a popup/floating group.

Here is the flow:

2 reusable elements on a page

reusable element one - trigger.

Reusable element 2 - popup
javascript to bubble element on the page

The page with the two elements on for reference

I read this: FAQ - Toolbox docs ← but I believe its all good?

Check for empty spaces in suffix fields. It’s ok on my side with your settings

are you on the latest plugin version? I have setup a new separate app and I still get the same issues… i even just used “1” no spaces, tried async ticked, unticked just to see etc …just an undefined error.

So weird


Yeap, 2.1.2v.
Try to assign an attribute ID to your Javascriptbubble element and pull it from the console in the dev tool.

So the popup ID is not visible when the popup is not shown on page load (obviously) and from this I assume the sending reusable cant find the popup (as its not show) receiving JavaScript.

is this the case?
I have been using another method to open reusable using custom states with the new reusable element properties but thought this may be easier…

from the docs above by the plugin author, that I didn’t read correctly - so my bad.

“If the app throws this error, the most likely cause of the error is the Javascript to Bubble element is hidden. This prevents it from creating the function bubble_fn_a.”

@Eugene_West ah yea, a mixed group combo would probably do it, ill give that a test.

@adamhholmes I actually just put the js element on the page (before i read this) rather than in the RE and tested it to trigger the event and it worked, so it looks like that it the key - thanks.

Using “Trigger a custom event from a reusable element”

I mean, your reusable element can have whatever hidden elements but JS element should be visible.

Combine group element(JS element) and popup element inside of reusable element ( group not popup)

The JavaScript to bubble must be visible in order for it to work (just like all plug-in elements)…

So don’t put it in your RE (there’s no point doing that anyway, as you can just trigger a custom event)… put it on the page itself.