davidjbradshaw/iframe-resizer

iframe resizer doesnt work on particular iframe links

kasisathya opened this issue · 5 comments

iframe resizer doesnt work on particular iframe links
<iframe src="Url-1"></iframe>

When am loading a page with the above iframe then iframeresizer works fine but when am loading the page with different Urls suppose

<iframe src="Url-2"></iframe>
<iframe src="Url-3"></iframe>
<iframe src="Url-4"></iframe>

For non of these the resizer works

The log stops till here:

[iFrameSizer][Host page: serviceBookingIframe] IFrame scrolling disabled for serviceBookingIframe
[iFrameSizer][Host page: serviceBookingIframe] [init] Sending msg to iframe[serviceBookingIframe] (serviceBookingIframe:8:false:true:32:true:true:null:max:null:null:0:false:parent:scroll:true) targetOrigin: https://somedomain.com
[iFrameSizer][Host page: serviceBookingIframe] IFrame has not responded within 5 seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning.

From the log message

Check iFrameResizer.contentWindow.js has been loaded in iFrame

Yes did check but iFrameResizer.contentWindow.js is not loaded into the page
However with the same logic <iframe src="Url-1"></iframe> Here the script loads successfully

The second file (iframeResizer.contentWindow.min.js) needs placing in the page(s) contained within your iFrame.

As per this statement, does it means this file needs to be present in the page which we are loading through iframe url?
In my eg: <iframe src="Url-2"></iframe>
The page which is loaded through Url-2 needs to have above mentioned script loaded in it?

Yes every page you load into the iframe