Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

629
Views
¿Cómo usar iFrameResizer en múltiples dominios?

Estoy usando Iframe Resizer y mi código no funciona entre dominios. Funciona bien cuando los dos dominios son iguales. ¿Puede usted ayudar? Es extraño porque el iframe definitivamente tiene iFrameResizer.contentWindow.js cargado Y uso checkOrigin: false, por lo que debería permitir el dominio cruzado ...

Estos son los errores que recibo en la consola al cargar la página principal que tiene el 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 answers
Answer question

0

Su llamada debe ser la siguiente.

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

0

tal vez intente validar el origen

 var domains = ['http://jacobjohnson.net','http://designtesting.cfs.local']; jQuery('#display_frame').iFrameResize( [{log:true, checkOrigin: domains}] );
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!