Iframe-resizer: Not working

Created on 17 Aug 2015  路  4Comments  路  Source: davidjbradshaw/iframe-resizer

Hello David,

I'm using your iframe-resizer in some places (eg:http://www.visitnavarra.info/nueva_central/frontEnd) and it seems to work out of the box, it's just amazing!

But today I'm having a problem with your iframe-resizer and I can't find why...

This is the origin page, where I have uploaded and linked the iframeResizer.contentWindow.min.js file:
https://www.reservon.es/motor-asociacion/57/es/fe/20-08-2015/coce/0/pl/1/pm/0/pmd/0

And this is the hosting page where I have uploaded the iframeResizer.min.js file:
http://www.visitnavarra.info/nueva_central/frontEnd/reservaReservon?idC=16&idR=&idP=&comidaCena=&fecha=20/08/2015&plazas=

The log is working in order to be able to see what is happening but I can't find the problem, could you please check it out?

Thank you so much!

Most helpful comment

Hi,
I think you have an issue with origin domain. The first iFrame ( which works ) is loading from:

[iFrameSizer][ifr] Initialising iFrame (http://www.visitnavarra.info/nueva_central/55070fb11187d0.08025952/motor/#/鈥%2Fwww.visitnavarra.info%2Fnueva_central%2FfrontEnd%2FreservaAlojamientos)

The visitnavarra.info host page is loading the visitnavarra.info iframe. The 2nd iFrame is displaying this error message:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.reservon.es') does not match the recipient window's origin ('http://www.visitnavarra.info').

visitnavarra.info host page is loading the iframe from reservon.es. The error messaging complaining about them not matching..

If you change the checkOrigin option to false in the iframe-resize to initialization it should correct the issue. You can also pass in a list of allowed domains if you know all the host domains, this will provide better cross site script security.

All 4 comments

Hi,
I think you have an issue with origin domain. The first iFrame ( which works ) is loading from:

[iFrameSizer][ifr] Initialising iFrame (http://www.visitnavarra.info/nueva_central/55070fb11187d0.08025952/motor/#/鈥%2Fwww.visitnavarra.info%2Fnueva_central%2FfrontEnd%2FreservaAlojamientos)

The visitnavarra.info host page is loading the visitnavarra.info iframe. The 2nd iFrame is displaying this error message:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.reservon.es') does not match the recipient window's origin ('http://www.visitnavarra.info').

visitnavarra.info host page is loading the iframe from reservon.es. The error messaging complaining about them not matching..

If you change the checkOrigin option to false in the iframe-resize to initialization it should correct the issue. You can also pass in a list of allowed domains if you know all the host domains, this will provide better cross site script security.

Hello again,

I've already modified my script, incluiding "checkOrigin:false", and now we don't get the cross domain error, but it doesn't seem to work, no resize at all :(

Any help? Thanks a lot!

The page in the iframe is using position absolute. This breaks the standard way of calculating the page height. You need to use one of the other methods. Please see the options and troubleshooting sections in the docs.

Thank you so much david, I didn't know it, now with 'bodyScroll' it works.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

premedios picture premedios  路  5Comments

Fanvaron picture Fanvaron  路  4Comments

sebaplaza picture sebaplaza  路  5Comments

dfelix86 picture dfelix86  路  4Comments

wei2go picture wei2go  路  3Comments