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
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

neffets - March 11, 2009 - 09:15

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

neffets - March 11, 2009 - 09:15
Status:active» closed

#3

Leiche - September 2, 2009 - 05:53
Version:6.x-1.2» 6.x-1.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

Leiche - September 2, 2009 - 05:56
Status:closed» active

Doh ... sorry for this post, but I forgot to reactivate the issue :(

#5

MarcElbichon - November 2, 2009 - 13:23
 
 

Drupal is a registered trademark of Dries Buytaert.