I have an issue I can't seem to solve, and I'd like some pointers.
So, I have, in JS, an URL.
The aim is to open a jQueryUI dialog containg an iFrame containing that URL.
The dialog should be as small as possible to fit the iFrame content without scrolling.
I have read something in an other question (Adjust width height of iframe to fit with content in it), suggesting:
iframe = iframe[0];
iframe.width = iframe.contentWindow.document.body.scrollWidth;
iframe.height = iframe.contentWindow.document.body.scrollHeight;
but I can't get it to work.
Indeed, the iFrame content does not exist until the dialog is created and by then, it's too late, and changing the iframe size does not change the dialog size.
Here is a fiddle with my progress on this issue.
https://jsfiddle.net/587mj6oy/
Thanks a lot for your help,
Maxime