I have the default Canvas index page as the home page. The buttons in the block have the options to link to (1) a Canvas marketing page, (2) a Bubble page, (3) an external link, and (4) run Javascript.
I have added a Bubble popup to the page and would like to have the button trigger the popup
Can this be done with Javascript or some other method?
Hello, are you familiar with the Toolbox plugin for Bubble apps?
Try adding that plugin to the app, and add a “Javascript to Bubble” element to the page.
Then, add some javascript code that matches the suffix from that Javascript to Bubble element. For the above example, that code would be bubble_fn_open_link(true).
Create a workflow that is triggered when this function is executed.
I have given this a try, but it is not working. Each time I click the button a small message appears in the corner of the browser saying: “javascript:void(0);”"
Hello, is the javascript to Bubble element placed directly on the webpage or inside of a Bubble group that is visible? It’s possible that the page hasn’t loaded this yet. in which case there will be an error shown in the browser javascript console.
Could you show the issue where it says javascript:void(0);, or send a test page so we can reproduce the issue?
Hey @eduard, good catch. That’s because the editor doesn’t include the entire marketing page served by Bubble, just the HTML that will be served inside the “index” or “page” page.