Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

159
Visualizações
Can't get the dynamic height right for embedded iframe

I am working on a WordPress website and want to embed an iframe from an external reservation/booking tool.

My issue: I can't make the height of the iframe dynamic. A fixed height of the iframe won't be a good solution in this case.

URL I want to embed https://w1.roomsoftware.com/de/markus-raab

Elementor Custom HTML widget:

<iframe src="https://w1.roomsoftware.com/de/markus-raab" id="booking"></iframe>

<script>
// Selecting the iframe element
var iframe = document.getElementById("booking");

// Adjusting the iframe height onload event
iframe.onload = function(){
    iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
}

Any idea what could be the reason that this does not work?

Screenshot shows the scrollbar of the embedded iframe

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda