ToolBox - JS to Bubble - doesnt work with iFrame

I have found that JS to Bubble (ToolBox) doesnt work if I define the HTML as iFRAME… any reason ? Also , if my HTML is not IFRAME , my 'SearchBox doesnt work with the Geographic search

1 Like

Javascript in an iframe needs to refer to its window.parent to access functionality on the Bubble page.


Thanks Mishav … not sure though what does this mean. How do I do that ?

Something like this @yaron.regev



Great !
It works !!!
Thanks heaps

1 Like

I’m trying to use WebRTC on Bubble without users downloading a third-party app (like Gruveo or Basically I want to allow a user to video chat with the click of a button. Is this what you were trying to do yaron.regev?


No … not at all.
I had a map in iFrame with some JS and I couldnt right to bubble DB without the solution that mishav suggested.

But… what is the problem you are facing ?

@yaron.regev could you share what you did as an example please( without sharing anything sensitive) im trying to work out how write back to bubble from an iframe with Toolbox.

as simple as that:


In your HTML (iFrame) add this function call where ‘runme’ equals to your suffix allocation on the ‘js to bubble’ entity and “blah” is the paramater (or value) you want to eight into the DB.


Hi @mishav

First of all, sorry for my poor English.

I can´t call this function on HTML

        var video = document.getElementById("myVideo"); 
        var btn = document.getElementById("myBtn");              
        function myFunction() {   
            if (video.muted) {     
                video.muted = false;  
                btn.innerHTML = "";

It doesn´t work, works only I remove this line:


Can you help me, please?

Have a nice day :slight_smile:


It doesn’t look like valid quotes. Please try to use:

Thanks for the tip!
Littles details … great results :slight_smile:

Now is runnig, but a I can´t get “back” value on Bubble.
Do you know how if I have to set any expression on JS to Bubble do retrive this value?

Thank you very much!

1 Like

Hi ottemind,

First I would like to thank you for your attention.

I will detail the situation a little:

  1. I have an HTML page that was defined as the URL source in the “Advanced iframe / Embed website Plugin for Bubble”.
  2. On this HTML page, pressing a button runs the following function

function myFunction() {
if (video.muted) {
video.muted = false;
btn.innerHTML = “”;
3) I would like to pass the value “12345” to my Bubble app.

Could you let me know how I would be able to receive the value “12345” in Bubble ?

Again, thank you for your attention and wish you a great day.

Thank you very much

PS: I´m using " " … but this forum page change post automatically.

1 Like


It might help if you have a look at the demo.



You need to use window.parent.bubble_fn_sounds only if you are using an iFrame.
If you are not using an iFrame, please try window.bubble_fn_sounds.

Also, the window.parent.bubble_fn_sounds should be triggered inside of your iFrame.

Let me know if you have any questions, please.

1 Like


Thank you very much for explaining and sending the example.

I understood how it works.

If placing the Iframe inside an HTML works perfectly, however, if you define the iframe from an external source ( the value is not sent to the Bubble.

I believe it is some safety rule.

Can you please attach a screenshot of your HTML element?


That means that you need to add the code to the following website:

1 Like

Your the real MVP :wink:

1 Like