We recently had a situation that required us to pull some content from one server to another using an iframe. Generally, this is something we will try to avoid, but we needed to pull some data from a new one. NET application in a legacy ColdFusion application.

Unfortunately, the wanted height of the side which in the preferred vary widely. This led to a rather disappointing experience where the page was either too long or the content of iframe was cut away and the user had to scroll the iframe to see everything.

We came up with what we thought might be an interesting solution. If the page loading inside the iframe (downstream side) to calculate its height, and somehow let the parent page know, the parent page to be able to reset the height of the iframe.

With a little inspiration, we came up with a pretty neat solution that we would like to share. Our solution requires that you have the option to edit the code of both major and minor sides.

The child page is loaded into iframe will simply reset the position of the main part, and includes a hash of the height of its own.

Chances are if you are a female, you will at… Read More…

Tags: