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
  1. Leave a comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: