[HELP] how to create button click event in infobox?

i am trying to create a zoom feature on infobox but cant catch the click event on the button click to do like in the instructions on this page. please help me! Cesium Sandcastle

uppppppp. help me please

How to use getElementById in InfoBox iframe? i try to use but it’s not work :frowning:

You can’t directly access elements present inside iframe. I’ve modified your sandcastle example to access element inside iframe and add eventlistener on that.

As the iframe is loading on clicking billboard entity, I’m using setInterval to check if iframe loaded or not. Above example is not the perfect one, but you may get idea to perform your task.

1 Like

wow, you are amazing, i tried another way, create a modal when clicking on the image then customize on the modal, using viewer.infoBox.frame.contentDocument.body.addEventListener

1 Like