Took me some time, but this is how I got it to work:
Say you want to load www.yourdomain.com/pagex.php into an iframe, and you want it to autoresize.
A. Create a new Snippet, call it AutoSizeiFrame and put the provided php-code into the snipped code box. Save it

. Remember to change
//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: [’myframe1’, ’myframe2’] or [’myframe’] or [] for none:
var iframeids=[" . $iframeids . "]
this part in the code to suit your needs. eg: var iframeids=[’myframe1’, ’myframe2’, ’myframe3’]
B. Create a new Templet Variable, give it a name, eg
’mynewframe’. As input type choose URL, In the dropdownbox Widget choose View Port, ID/Name: myframe1, at least choose autosize: yes and stretch to fit: yes. In the part template access check the template you are using. Save it

.
c. Create a new Document, use
[[AutoSizeiFrame? &iframeids=myframe1]] [*mynewframe*] to call both the created autoresizeiframe Snippet (A) and the created frame (B) in the document. Fill in the URL of the page you want to load (www.yourdomain.com/pagex.php) in the section Template Variables, where now
mynewframe is showing up. After choosing http:// ofc. Save it

.
Goodluck