absurdist-hero
absurdist-hero

Reputation: 21

iframe resizer second not resizing

I'm trying to include multiple height-adjusting iFrames with different sources on the page below:

https://succeed.serenova.com/lp-cloud-contact-center/

The only instance where iFrame Resizer works is on the first lightbox, which is instantiated through the "Get My Free Live Demo" button and a few others.

The lightboxed iFrames connected to the "Questions?" and "Download the Gartner Report" buttons are not working, despite being implemented in exactly the same way.

Here is the first light box before resize:

First iFrame Before Resize

And after successful resize:

First iFrame After Successful Resize

And the second before:

Second iFrame Before Resize Attempt

And after failed resize:

Second iFrame After Failed Resize

Test Steps:

  1. Go to https://succeed.serenova.com/lp-cloud-contact-center/
  2. Click the first "Get My Free Live Demo" button
  3. Click the form submit button "Get My Free Live Demo" and note that the iframe adjusts as it should
  4. Close modal
  5. Scroll down until you see the button "Questions?" and click it
  6. Hit "Submit" on the form and note that iFrame resizer does not update the iFrame size

OR, to reproduce on your own:

  1. Create working instance of iFrame resizer on a page (preferably containing content from a different domain)
  2. Create a second instance of an iFrame (with a different source) to resize on the same page
  3. Test whether second instance of iFrame resizes on change of content

Thanks in advance for any help!

Upvotes: 2

Views: 1018

Answers (1)

David Bradshaw
David Bradshaw

Reputation: 13077

Have a look in your console log

iframeResizer.js:634 Failed to execute 'postMessage' on 'DOMWindow': 
The target origin provided ('https://pi.pardot.com') does not match the 
recipient window's origin ('https://go.pardot.com').

You need set the checkOrigin property to fix this.

https://github.com/davidjbradshaw/iframe-resizer#checkorigin

Upvotes: 0

Related Questions