Archive for August, 2015

Dynamically change Iframe height for cross domain site.

If you want to make iframe height change dynamically according to content then just use this. .-)

##### External site HTML #####

Add iframe tag with src.
Add js file from library:- http://INCLUDE-JS-FILE_PATH/iframeResizer.min.js

call js function :-

iFrameResize({log:false});

######

It works using iframe-resizer framework. So the iframe source page also need to include one js file as well.

#### Iframe content site #####
Add js file from library:-
http://INCLUDE-JS-FILE_PATH/js/iframeResizer.contentWindow.min.js

### GIT REPO of Iframe resizer framework(See example/index.html and example/frame.content.html ) ###

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

Advertisements

Leave a comment