Auto-Detect iframe height based on target url height
matt_c - January 18, 2009 - 11:34
| Project: | Iframe |
| Version: | 6.x-1.3 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Is it possible for the IFRAME module to automatically detect the height of the target url and scale accordingly. This would mean the IFRAME always displays without a scroll bar.
And if not, can we have master settings for width and height? i.e. not exposed to the users in a cck field?

#1
1) it is possible to detect the height of the iframe, BUT only if the iframe-content is from the same domain (same-origin-policy by the browsers)
see:
get http://schuessler-reisen.de/sites/all/js/iframe_resize.js and adjust the iframeid Variable at top.
You have to include it in your master-Template page.tpl.php
2) You can give master width and height, when You add the iframe-cck-fields on your "content-types" (e.g. story, btw. page)
(if this is not working for You file a bug-report please)
n
#2
#3
Hi,
thats the answer that I was searching for.
But I have a small problem with it, because I'm not a great programmer.
What is the "iframeid" and where can I look it up?
How do I include the JavaScript into my page.tpl.php?
Can I use my theme page.tpl.php?
Sorry for this stupid questions, but like I said I'm totally new to tweaking Drupal files in this way.
Cheers Leiche
#4
Doh ... sorry for this post, but I forgot to reactivate the issue :(
#5
See insertframe module