Uncaught ReferenceError: iFrameResize is not defined

Vikas Dubey picture Vikas Dubey · Apr 22, 2016 · Viewed 7.6k times · Source

I need to make my iframe height dynamically adjustable according to its content height. I am using davidjbradshaw's iframeResizer.js for the task. I have added iframeResizer.contentWindow.js in the content page as well. and iFrameResizer.min.js in iframe page.

While calling iFrameResize({log:false}); I am getting the following error in console:

Uncaught ReferenceError: iFrameResize is not defined

I have tried calling iFrameResize({log:false}) on onload of iframe as well but I am still getting the same error.

Answer

Mahendran Kannan picture Mahendran Kannan · Apr 22, 2016

It seems that you've not added the iFrameResizer.min.js in iframe page. Just check the file name and path. Make sure that iFrameResizer.min.js is loaded.

Also, check the below link

http://davidjbradshaw.github.io/iframe-resizer/#troubleshooting