Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

626
Vistas
How to use iFrameResizer on multiple domains?

i'm using Iframe Resizer and my code is not working cross domain. It works fine when the two domain are the same. Can you help? It's weird because the iframe definitely has the iFrameResizer.contentWindow.js loaded AND i use the checkOrigin: false so it should allow the cross domain...

Here are the errors I get in the console when loading the parent page that has the iframe:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('http://jacobjohnson.net') does not match the recipient window's origin ('http://designtesting.cfs.local').

iframeResizer.min.js:8 [iFrameSizer][Host page: display_frame] No response from iFrame. Check iFrameResizer.contentWindow.js has been loaded in iFrame

<div class="panel panel-default" id="iframePanel">
    <div class="panel-body" style="padding:0px;">
       <iframe id="display_frame" name="display_frame" class="frame" src="http://jacobjohnson.net/iframetest.html" allowfullscreen></iframe>
    </div>
</div>


<script>

    jQuery('#display_frame').iFrameResize( [{log:true, checkOrigin: false}] );

    var frameHeight =  3905; // $('#display_frame').height();
    var newHeight = frameHeight / 2;
    $('#iframePanel').height(newHeight);

    $(window).resize( function() {
        var frameHeight = $('#display_frame').height();
        var newHeight = frameHeight / 2;
        $('#iframePanel').height(newHeight);
    });

</script>
about 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Your call should be as follows.

jQuery('#display_frame').iFrameResize({log:true, checkOrigin: false});
about 4 years ago · Santiago Trujillo Denunciar

0

maybe try validating origin

var domains = ['http://jacobjohnson.net','http://designtesting.cfs.local'];
jQuery('#display_frame').iFrameResize( [{log:true, checkOrigin: domains}] );
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda