Has anyone worked with the iFrameResizer library?

Hi,

We are developing a Hype mini site displayed in an iFrame.

The host site uses the iFrameResizer library to adjust the iFrame height to the actual content of the iFrame.

We implemented the iframeResizer.contentWindow.js into our html file, but it does not seem to work out of the box with a Hype page (we tested it successfully with a standard non-Hype page).

Does anyone have experience with this library and Hype ?

Many thanks for your help.

In attachment, a dummy Hype document and export.
iFrameTestHype.zip (114.6 KB)

Here is the GitHub link : https://github.com/davidjbradshaw/iframe-resizer

???..

But you have not implemented it. This looks like you have just put a rect on a scene and a script link in the Head.
Where is the iFrame and the code you are implementing to run the library…

Yes, in the .html, there is the added link to the JS lib after the Hype code link (I manually removed from the head and put it in the body) :

<script type="text/javascript" src="iframeResizer.contentWindow.js" defer></script>

  • You don’t have any iframes in your exported HTML document, you have an embedded standard Hype div.
  • Your Tumult Hype document is not responsive (it will always have a height of 400px)

Can you share a bit more about the issue you’re trying to avoid, why you need to use iframes, and bit more about the project?

Hi Daniel,

I sent you 2 PMs 2 hours ago about that.

Just to highlight this guys. I'm reading this as he is placing an exported Hype doc into an iFrame on a specific html page

4B7ADBA2-82D6-440D-AE60-CF45C66949A8

Kind of like this.

And the iFrameResizer Library is adjusting the iFrame to the content (Hype Export)

I may be wrong

As you guys have already mentioned though @teo1310 doesn't seem to have included any iFrame in both the document and the export. So, @teo1310 it looks as if you need to add an iFrame to the Hype doc (HTML widget) or enclose your Hype exported "DIV" in an iFrame also.

Personally, I'd like to know the reason for having an iFrame in the first place as I (or probably anyone else) can't see the reasoning behind using this library. Could you give a little more background?

Also, as Daniel says the Hype doc is not responsive so won't adjust to the resizing as you want i suspect.

I appreciate that you've sent Daniel some PM's but you might have better luck including more people in the loop :smiley: